Cov txheej txheem:
- Kauj ruam 1: Cov ntaub ntawv
- Kauj ruam 2: Kev thaiv kab
- Kauj Ruam 3: Calibrate Microphone
- Kauj ruam 4: Txoj Cai
Video: Arduino Birthday Cake: 4 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:24
Hauv cov lus qhia no, kuv yuav ua qhov yooj yim heev thiab ua haujlwm yooj yim arduino: ncuav mog qab zib hnub yug!
Ib lub ncuav mog qab zib hnub yug tau tshwm ntawm UTFT lub vijtsam tiv thaiv ntawm arduino thiab tus hais lus ua suab paj nruag "Zoo siab hnub yug".
Thaum koj tshuab ntawm lub microphone, tswm ciab tua.
Kauj ruam 1: Cov ntaub ntawv
Rau txoj haujlwm yooj yim no, koj yuav xav tau:
- Arduino MEGA
- tus hais lus lossis lub suab nrov
- lub microphone module
- UTFT npo arduino daim thaiv
Kuv txiav txim siab siv daim npav arduino MEGA rau txoj haujlwm no rau ob qho laj thawj: nws muaj lub cim xeeb ntau thiab nws muaj tus pin ntau.
Koj tsis tuaj yeem siv arduino UNO rau txoj haujlwm no, vim tias thaum lub vijtsam UTFT txuas rau nws txhua tus pin tau muab zais (tsis muaj ntxiv rau lub microphone thiab tus hais lus), thiab nws tsis muaj lub cim xeeb txaus (UTFT lub tsev qiv ntawv yog loj heev).
Kauj ruam 2: Kev thaiv kab
Tus hais lus ntsaws rau ntawm tus pin D40 thiab GND ntawm arduino.
Lub microphone ntsaws rau ntawm tus pin GND ("G"), 5V ("+") thiab A10 ("A0").
UTFT lub vijtsam ntsaws zoo li daim ntaub thaiv ib txwm muaj.
UTFT lub vijtsam tiv thaiv tsis tuaj yeem ua tiav nrog arduino MEGA: USB ntsaws ntawm arduino board loj heev
Txhawm rau kho qhov teeb meem no, Kuv tau ntsaws qhov UTFT npo ntawm lwm qhov thaiv arduino (nrog tus pin ntev dua), tom qab ntawd kuv ntsaws ob qho tib si ntawm arduino.
Kauj Ruam 3: Calibrate Microphone
Txhawm rau ntsuas lub microphone, koj yuav xav tau tus ntsia hlau thiab koj lub khoos phis tawj.
Ua ntej tshaj, xa cov cai hauv qab no rau koj arduino:
int tau = 0;
teeb tsa tsis muaj dab tsi () {Serial.begin (9600); } tsis muaj dab tsi voj () {val = analogRead (10); Serial.println (nqi); ncua (100); }
Tom qab ntawd mus rau lub ntsuas saib thiab ntsuas lub microphone los ntawm tig lub hwj chim nrog lub ntswj taub hau thaum tsis muaj lub suab, tus nqi yuav tsum yog kwv yees li 30 ~ 40.
Thaum koj tshuab ntawm lub microphone, tus nqi yuav tsum siab dua 100.
Nco ntsoov tias tus nqi me dua 100 thaum koj hais lus (txawm nrov).
Kauj ruam 4: Txoj Cai
Nov yog txoj cai ntawm txoj haujlwm.
Nws nthuav qhia lub ncuav mog qab zib hnub yug nrog tswm ciab ntawm UTFT thiab ua yeeb yam "Zoo siab hnub yug" nrog tus hais lus. Lub ncuav mog qab zib yog ua nrog cov duab plaub.
Txoj haujlwm no xav tau UTFT lub tsev qiv ntawv.
#suav nrog
sab nrauv uint8_t BigFont ; // hloov cov txiaj ntsig no raws li koj lub vijtsam qauv UTFT myGLCD (ITDB28, A5, A4, A3, A2); int melody = {196, 196, 220, 196, 262, 247, 196, 196, 220, 196, 294, 262, 196, 196, 196, 392, 330, 262, 247, 220, 349, 349, 330, 262, 294, 262}; int noteDurations = {8, 8, 4, 4, 4, 2, 8, 8, 4, 4, 4, 4, 2, 8, 8, 4, 4, 4, 4, 3, 8, 8, 4, 4, 4, 2}; int tau = 0; teeb tsa tsis muaj dabtsis () {myGLCD. InitLCD (); myGLCD.setFont (BigFont); myGLCD.fillScr (20, 200, 150); // xiav keeb kwm yav dhau myGLCD.setColor (200, 125, 50); // ncuav mog qab zib xim av myGLCD.fillRect (100, 90, 220, 160); myGLCD.setColor (255, 255, 255); // dawb icing myGLCD.fillRect (100, 90, 220, 105); myGLCD.setColor (255, 50, 50); // kab liab myGLCD.fillRect (100, 120, 220, 123); myGLCD.fillRect (100, 140, 220, 143); myGLCD.setColor (255, 255, 0); // kab kab daj myGLCD.fillRect (100, 130, 220, 133); myGLCD.setColor (255, 170, 255); // tswm ciab liab myGLCD.fillRect (128, 70, 132, 90); myGLCD.fillRect (158, 70, 162, 90); myGLCD.fillRect (188, 70, 192, 90); myGLCD.setColor (255, 255, 0); // taws tswm ciab myGLCD.fillCircle (130, 62, 5); myGLCD.fillCircle (160, 62, 5); myGLCD.fillCircle (190, 62, 5); myGLCD.setColor (0, 255, 0); // zoo siab hnub yug lus myGLCD.print ("HAPPY BIRTHDAY!", CENTER, 200); rau (int thisNote = 0; thisNote 100) {myGLCD.setColor (20, 200, 150); // tua cov tswm ciab myGLCD.fillCircle (130, 62, 5); myGLCD.fillCircle (160, 62, 5); myGLCD.fillCircle (190, 62, 5); myGLCD.setColor (255, 255, 255); // thiab nthuav tawm "zoo siab" cov lus myGLCD.print ("CONGRATULATIONS !!!", CENTER, 10); ncua (10000); myGLCD.clrScr (); // clear screen tom qab 10s}}
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
REMOTE CONTROL CAR PIECE OF CAKE: 10 Kauj Ruam
REMOTE CONTROL CAR PIECE OF CAKE: Nyob zoo txhua tus hauv phau ntawv qhia no muaj peev xwm. Kuv yuav qhia koj ib qib zuj zus cov lus qhia yuav ua li cas thiaj ua tau yooj yim rf (xov tooj cua zaus) RC (chaw taws teeb tswj) lub tsheb Qhov no tuaj yeem ua los ntawm txhua tus pib hauv ib teev Kuv yuav tham txog kev ua haujlwm ntawm txhua qhov kev sib koom ua ke
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
Captains Birthday Shield: 11 Kauj Ruam (nrog Duab)
Captains Birthday Shield: Nyob zoo, nws yog kuv tus tub xeeb ntxwv hnub yug tsis ntev no thiab kuv yeej xav muab qee yam hauv tsev rau nws. Tau kawg nws yuav tsum saib txias heev thiab raws li qhov tseeb. Los yog tsawg kawg loj thiab ci. Daim paib Captain America ib txwm yog yam kuv xav ua. Tsis w
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