Cov txheej txheem:

Music Assembler: Integrated Virtual Musical Instrument With Block-Typed Touch Sensor: 4 Kauj Ruam
Music Assembler: Integrated Virtual Musical Instrument With Block-Typed Touch Sensor: 4 Kauj Ruam

Video: Music Assembler: Integrated Virtual Musical Instrument With Block-Typed Touch Sensor: 4 Kauj Ruam

Video: Music Assembler: Integrated Virtual Musical Instrument With Block-Typed Touch Sensor: 4 Kauj Ruam
Video: Lay Hand Prayer,Bishop Amardeep Ministry 2024, Kaum ib hlis
Anonim
Music Assembler: Integrated Virtual Musical Instrument With Block-Typed Touch Sensor
Music Assembler: Integrated Virtual Musical Instrument With Block-Typed Touch Sensor

Muaj ntau tus neeg uas xav kawm ntaus suab paj nruag. Tu siab, qee qhov ntawm lawv tsis pib nws vim tias tus nqi siab ntawm cov twj paj nruag. Raws li nws, peb tau txiav txim siab los ua ke ua ke cov cuab yeej siv suab paj nruag virtual los txo cov peev nyiaj ntawm pib kev paub tshiab thiab muab sijhawm rau tib neeg kom nkag tau ntau yam twj paj nruag. Peb tau siv cov ntsuas ntsuas ntsuas txij li peb xav tias kev kho lub khoos phis tawj yog qhov tsim nyog rau muab rau tib neeg kev paub zoo ib yam uas lawv tab tom ua si tiag tiag.

Peb siv Stickii roll bock (rubber block), daim kab xev conductive, arduino rau kho vajtse. Txawm hais tias peb siv cov roj hmab thaiv, koj tuaj yeem siv cov khoom siv lossis siv cov kab xev xwb.

Khoom siv

Txhawm rau ua Block-Typed Touch Sensor, koj xav tau cov hauv qab no cov phooj ywg:

  • Stickii Roll Block (tsis tsim nyog)
  • Cov Kab Xev
  • Arduino (piv txwv yuav siv mega)
  • Cov kab
  • 1M tus tiv thaiv

Koj tseem xav tau cov software hauv qab no:

  • Arduino IDE Cov
  • Kev sib haum xeeb

Kauj Ruam 1: Tag Nrho Cov Qauv Tsim

Tag Nrho Cov Qauv Tsim
Tag Nrho Cov Qauv Tsim

Tag nrho cov kab ke ua haujlwm zoo li no.

Kauj Ruam 2: Kauj Ruam 1: Tsim Lub Phaj Phaj

Kauj Ruam 1: Tsim Lub Phaj Phaj
Kauj Ruam 1: Tsim Lub Phaj Phaj
Kauj Ruam 1: Tsim Lub Phaj Phaj
Kauj Ruam 1: Tsim Lub Phaj Phaj

Ua ntej, yog tias koj sim siv stickii roll block lossis zoo ib yam, koj yuav tsum ua cov phaj thaiv.

Koj yuav tsum ua qhov uas yuav txuas ncaj qha rau arduino thiab kov lub sensor. Yog tias koj muaj tus pin txaus hauv arduino lossis tuaj yeem nthuav nws, koj tuaj yeem ua ntau qhov. Ntau qhov muaj nyob, tib neeg tuaj yeem siv khoos phis tawj ntau dua. Lub qhov taub tuaj yeem tau txais cov ntaub ntawv kov cov ntaub ntawv los ntawm kev siv arduino lub peev xwm ntsuas lub tsev qiv ntawv.

Tom qab ua lub qhov, muab xaim tso rau tag nrho zoo li daim duab thib ob thiab txuas cov xaim mus rau arduino nrog 1 tus tiv thaiv zoo li thawj daim duab kos.

Hauv qab no yog tus lej arduino ntawm qhov piv txwv.

#suav nrog #define SIZE 24

CapacitiveSensor cs [SIZE] = {

CapacitiveSensor (52, 53), CapacitiveSensor (50, 51), CapacitiveSensor (48, 49), CapacitiveSensor (46, 47), CapacitiveSensor (44, 45), CapacitiveSensor (42, 43), CapacitiveSensor (40, 41), CapacitiveSensor (38, 39), CapacitiveSensor (36, 37), CapacitiveSensor (34, 35), CapacitiveSensor (32, 33), CapacitiveSensor (30, 31), CapacitiveSensor (28, 29), CapacitiveSensor (26, 27), CapacitiveSensor (24, 25), CapacitiveSensor (22, 23), CapacitiveSensor (2, 3), CapacitiveSensor (4, 5), CapacitiveSensor (A0, A1), CapacitiveSensor (A2, A3), CapacitiveSensor (A4, A5), CapacitiveSensor (A6), A7), CapacitiveSensor (A8, A9), CapacitiveSensor (A10, A11)};

bool sens [SIZE] = {tsis tseeb};

void teeb tsa ()

{int ib; Serial.begin (9600); rau (i = 0; kuv <SIZE; i ++) {sens = cuav; }}

void lub voj ()

{ntev pib = millis (); rau (int i = 0; i 600) sens = tseeb; lwm qhov hnov = tsis tseeb; }

rau (int i = 0; i <SIZE; i ++) {Serial.print (sens )); } Serial.println (); Serial.flush (); ncua (50); // kev xav qeeb qeeb kom txwv cov ntaub ntawv mus rau chaw nres nkoj txuas}

Kauj Ruam 3: Kauj Ruam 2: Ua Tus Block-Typed Touch Sensor

Kauj Ruam 2: Ua Tus Block-Typed Touch Sensor
Kauj Ruam 2: Ua Tus Block-Typed Touch Sensor
Kauj Ruam 2: Ua Tus Block-Typed Touch Sensor
Kauj Ruam 2: Ua Tus Block-Typed Touch Sensor

Ua kov sensor yog ib qho yooj yim. Ib yam li thaiv phaj, ua lub qhov zoo li daim duab thawj thiab tseem muab xaim.

Tom qab ntawd muab daim kab xev tso rau sab saum toj ntawm lub thaiv (lossis lwm yam khoom koj xav siv).

Kauj Ruam 4: Kauj Ruam 3: Txuas Kev Sib Koom thiab Arduino

Qhov no yog cov kauj ruam kawg.

Tom qab xa cov cai rau arduino, khiav software sib koom ua ke. (Koj yuav tsum tsis txhob qhib qhov saib xyuas txuas nrog kev sib koom ua ke thiab arduino). Koj tuaj yeem rub tawm txoj haujlwm sib koom hauv qab github.

github.com/crysm28/musicassembler

Pom zoo: