Cov txheej txheem:
- Kauj Ruam 1: Rub Tawm thiab Rub Tawm Resistors
- Kauj Ruam 2: Tone Fuction thiab Zaus
- Kauj Ruam 3: Momentary Switches (Kev Hloov Siab)
- Kauj ruam 4: Schematics
- Kauj ruam 5: Code
Video: Arduino Piano: 5 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:30
nyob zoo cov phooj ywg koj ib txwm xav ua piano, yog tias yog, tom qab ntawd koj nyob hauv qhov chaw raug.
Khoom siv
1. Arduino
2.8 ohms hais lus
3. Rub cov neeg tawm tsam (1k - 10k yuav ua tau zoo xwb)
4.8 tact hloov
5. Breadboard thiab veroboard
Kauj Ruam 1: Rub Tawm thiab Rub Tawm Resistors
rub tawm resistor
Qhov no yog cov tiv thaiv uas ua rau lub xeev cov laj thawj ntawm tus pin HIGH thaum tus pin tsis txuas lossis tsis muaj lub xeev.
Rub cov resistors
Cov tshuaj tiv thaiv no pab ua kom lub xeev cov laj thawj ntawm tus lej qis thaum tsis txuas lossis thaum tus pin tsis muaj lub xeev.
Txhawm rau kawm paub ntau ntxiv txog rub thiab rub cov neeg tawm tsam mus ntsib
playground.arduino.cc/CommonTopics/PullUpD…
Nco tseg: muaj peb lub xeev pins uas yog HIGH, LOW THIAB ntab lossis qhov tseem ceeb. Thaum tus pin yog HIGH nws txhais tau tias nws ntawm 5v (rau Arduino MCU), thaum LOW txhais tau tias nws nyob ze 0v lossis GND, thaum rau ntab txhais tau tias nws tsis muaj lub xeev nws tsis yog HIGH LOSSIS LOW.
NCO TSEG: hauv cov lus qhia no peb yuav siv rub tawm cov resistors
Kauj Ruam 2: Tone Fuction thiab Zaus
Arduino suab fuction
Qhov haujlwm no yog siv los tsim txhua zaus ntawm Arduino tus pin
suab nrov (tus pin, zaus, sijhawm lossis ncua sijhawm);
Piv txwv li lub suab (9, 3100, 100);
noTone ()
Cov haujlwm no tau siv thaum koj tsis xav ua suab nrov lossis zaus ntawm tus pin tshwj xeeb.
noTone (tus pin);
Piv txwv noTone (9); // qhov no yuav ua si tsis muaj suab nrov lossis zaus ntawm tus pin 9.
NCO TSEG: Yog tias koj xav hloov tus pin siv rau lub suab kom ntseeg tau tias nws yog PWM tus pin.
tone (pwm pin, zaus, ncua);
noTone (pwm pin); Txhawm rau nrhiav tawm pwm tus pin rau Arduino xauj qhov haujlwm. Piv txwv li tshawb nrhiav (pwm tus pin ntawm Arduino pro mini). Tsuas yog hloov cov pro mini rau Arduino micro tswj koj siv. Yog xav paub ntxiv txog pwm mus ntsib
Kauj Ruam 3: Momentary Switches (Kev Hloov Siab)
Qhov hloov pauv no thaum nias tau txuas nrog rau lub sijhawm koj nias lawv tam sim koj tshem koj txhais tes lawv tau txuas nrog. Yog xav paub ntau ntxiv txog yuav siv lub tswv yim hloov pauv li cas rub cov vis dis aus hauv cov lus qhia no
Kauj ruam 4: Schematics
yog tias koj tab tom siv cov cai nrog sab hauv rub tawm cov neeg tawm tsam tsis quav ntsej rub tawm cov neeg tawm tsam hauv qhov kev qhia no. Nco ntsoov txuas ib tus coj ntawm koj tus neeg hais lus rau pwm tus pin 9 lossis tus pin pwm koj siv thiab lwm tus rau GND. yog tias koj tus neeg hais lus yog polarized txuas qhov zoo coj koj tus pin pwm thiab tus pin tsis zoo rau GND.
Kauj ruam 5: Code
Txoj cai thib ob tau hloov kho tag nrho los ntawm kuv rau cov uas tsis muaj cov neeg tawm tsam siv los rub tawm cov neeg tawm tsam
Code ib lub npe yog Arduino piano.zip, thaum code2 yog piano.zip
Ua tsaug rau kev nyeem ntawv. Ua si koj lub piano kom txog thaum koj tus ntsuj plig dhia mus zoo siab.
Kuv tsis tuaj yeem kos kuv li YouTube video, tab sis koj tuaj yeem nkag mus los ntawm qhov txuas no
www.youtube.com/embed/apsuFn0Wp1g
Pom zoo:
Arduino Tsheb Rov Qab Chaw Nres Tsheb Ceeb Toom - Cov Kauj Ruam ntawm Kauj Ruam: 4 Kauj Ruam
Arduino Tsheb Rov Qab Chaw Nres Tsheb Ceeb Toom | Cov kauj ruam ib kauj ruam: Hauv txoj haujlwm no, kuv yuav tsim qhov yooj yim Arduino Tsheb Rov Qab Tsheb Nres Tsheb Nres Sensor Siv Arduino UNO thiab HC-SR04 Ultrasonic Sensor. Qhov no Arduino raws Lub Tsheb Rov Qab ceeb toom tuaj yeem siv rau Kev Tshawb Fawb Txog Tus Kheej, Robot Ranging thiab lwm yam
RC Taug Qab Neeg Hlau Siv Arduino - Kauj Ruam Ib kauj ruam: 3 Kauj Ruam
RC Tracked Robot Siv Arduino - Kauj Ruam Ib Nrab: Hav guys, Kuv rov qab los nrog lwm tus neeg hlau txias chassis los ntawm BangGood. Vam tias koj tau dhau los ntawm peb cov phiaj xwm yav dhau los - Spinel Crux V1 - Tus Cwj Pwm Tswj Tus Neeg Hlau, Spinel Crux L2 - Arduino Xaiv thiab Muab Neeg Hlau nrog Robotic caj npab thiab Badland Braw
DIY Arduino Robotic Arm, Kauj Ruam ntawm Kauj Ruam: 9 Kauj Ruam
DIY Arduino Robotic Arm, Kauj Ruam ntawm Kauj Ruam: Cov ntawv qhia no yog qhia koj yuav tsim lub Caj Npab Caj Npab ntawm koj tus kheej li cas
Arduino Piano Piano: 10 Kauj Ruam (nrog Duab)
Arduino Piano Piano: Tshaj ib lub caij ntuj sov kuv tsim cov piano hauv pem teb no. Nws tau ua qauv me ntsis tom qab ntaus piano hauv zaj yeeb yaj kiab "Loj". Kuv siv yuav luag 100 teev tsim qhov no, tab sis kuv kwv yees nws tsuas siv sijhawm 30 teev yog tias kuv yuav rov ua dua. Muaj ntau dua 1
Piano Piano: 9 Kauj Ruam (nrog Duab)
Piano Piano: Kuv tau ua piano hauv pem teb no los ua txoj haujlwm. Peb tau txais kev tshoov siab, ntawm chav kawm, los ntawm cov yeeb yaj kiab BIG - koj paub qhov tshwm sim - qhov twg Tom Hanks thiab Robert Loggia ua si ntawm lub piano loj hauv pem teb ntawm FAO Schwarz. Nws ua rau kuv muaj teeb meem loj, thiab coj mus heev, tau