Cov txheej txheem:

Ntawv Piano Nrog Arduino: 5 Kauj Ruam
Ntawv Piano Nrog Arduino: 5 Kauj Ruam

Video: Ntawv Piano Nrog Arduino: 5 Kauj Ruam

Video: Ntawv Piano Nrog Arduino: 5 Kauj Ruam
Video: NOOBS PLAY CLASH ROYALE FROM START LIVE 2024, Kaum ib hlis
Anonim
Image
Image

Nov yog txoj haujlwm yooj yim siv Arduino, kos cov keyboard siv cov xaum xaum, ntawv, thiab tus hais lus.

Kauj ruam 1: Cov ntaub ntawv

-Txiv neej-rau-txiv neej jumper xov hlau:

- Creadboard:

- Arduino Uno board:

- Resistor 1M ohm:

- Hais lus:

- Cwj mem

- A4 ntawv

- Ntawv ntawv

Kauj ruam 2: Teeb Koj Cov Keyboard

Muab Nws Tag Nrho Ua Ke
Muab Nws Tag Nrho Ua Ke

Cov ntsuas tau tsim los ntawm kev kos duab ntawm daim ntawv nrog tus xaum. Hauv kuv qhov project kuv tsuas yog siv 8 tus yuam sij. Txhua lub piano tseem ceeb yog lub ntsuas cua uas lub ntsuas cua thiab koj lub cev tsim ua lub peev xwm. Qhov ntau nws lub peev xwm, tus nqi ntau nws tuaj yeem khaws cia. Lub peev xwm ntawm lub ntsuas cua no nyob ntawm seb kaw koj txhais tes nrog lub sensor li cas. Yog tias koj xav tau qee qhov zoo, kab tuab ntawm daim ntawv.

Kauj Ruam 3: Muab tag nrho ua ke

Muab Nws Tag Nrho Ua Ke
Muab Nws Tag Nrho Ua Ke

- Cia tso cov resistors rau ntawm lub khob cij.

- Txuas koj lub xov hlau jumper mus rau kev kos duab los ntawm daim ntawv xov xwm.

- Txhua txhua qhov kawg ntawm tus tiv thaiv xav tau ob lub xov hlau txuas. Txuas koj txhua lub xov hlau txuas los ntawm ntawv piano mus rau txhua qhov kawg ntawm tus tiv thaiv thiab tom qab ntawd txuas cov xov hlau rau tus lej digital 3-10.

Lwm qhov kawg ntawm txhua tus tiv thaiv txuas nrog tus pin 2.

- Txuas tus neeg hais lus rau Arduino nrog ib lub xov hlau rau tus lej digital 11 thiab lwm tus txuas rau hauv av ntawm Arduino.

Kauj ruam 4: Code

Ua ntej koj pib ua si koj daim ntawv ntaus piano, koj yuav xav tau Capasitive sensor library yog tias nws tseem tsis tau teeb tsa. Qhov no tuaj yeem rub tawm los ntawm no.

Thaum koj xav ntxiv lub tsev qiv ntawv tshiab rau hauv koj Arduino IDE. Mus rau cov npe uas koj tau rub tawm ZIP cov ntaub ntawv ntawm lub tsev qiv ntawv. Luam tawm ZIP cov ntaub ntawv nrog tag nrho nws cov qauv txheej txheem hauv ib ntus nplaub tshev, tom qab ntawd xaiv cov ntawv tais ceev tseg, uas yuav tsum muaj lub tsev qiv ntawv lub npe. Luam nws hauv "cov tsev qiv ntawv" nplaub tshev hauv koj phau ntawv teev npe.

Kauj ruam 5: Cia Ua Si

Koj tuaj yeem ua suab nrov yog tias koj coj mus rhaub ntawm cov ntawv piano. Yog cov yuam sij tsis teb, koj yuav xav hloov pauv qhov muaj peev xwm ua tau (tus nqi) rau koj daim duab lossis koj yuav xav rov taug qab koj daim duab dua. Kuv pom zoo koj cov kab tuab ntawm daim ntawv thaum koj kos cov yuam sij piano hauv ntawv.

Pom zoo: