Cov txheej txheem:
- Kauj ruam 1: Yam Koj Yuav Tsum Tau
- Kauj Ruam 2: Yam Koj Yuav Tsum Paub
- Kauj Ruam 3: Tsim Circuit Court
- Kauj ruam 4: Code
- Kauj ruam 5: Ua tiav
Video: Arduino Music Player: 5 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
Nyob zoo sawv daws.
Nag hmo, Kuv tau caij nthwv dej hauv Is Taws Nem thiab tshawb nrhiav cov haujlwm uas kuv tuaj yeem ua ntawm Arduino. Kuv pom tus poj niam no ua cov keyboard piano hluav taws xob nrog cov nkauj hauv nws. Kuv muaj LCD Keypad Shield dag ib puag ncig yog li kuv xav tias kuv tuaj yeem ua lub tshuab ntaus nkauj uas muaj cov ntawv me me nrog nkauj thiab tus neeg siv tuaj yeem xaiv nws.
Koj tuaj yeem pom qhov kawg ntawm kuv qhov haujlwm saum toj no.
Kauj ruam 1: Yam Koj Yuav Tsum Tau
Rau qhov haujlwm no koj xav tau;
- Arduino Ib
- Cov qhob cij
- LCD Keypad Shield
- Buzzer
- 330 ohm tiv thaiv
- Cov neeg dhia
Kauj Ruam 2: Yam Koj Yuav Tsum Paub
Koj yuav tsum paub me ntsis txog tus qauv ntawm LCD Keypad Shield. Kuv muab lub pinout ntawm nws kom koj tuaj yeem pom dab tsi yog dab tsi.
Raws li koj yuav pom hauv cov cai; tus lej 4, 5, 6, 7, 8 thiab 9 tau siv los ntawm LCD. Pin 10 yog rau kev tswj lub teeb pom kev ntawm LCD tab sis koj yuav tsis xav tau Hauv Circuit Court, cov nyees khawm txuas nrog A0 tus pin.
Qhov ntawd ua rau peb nrog cov pins digital 0, 1, 2, 3, 11, 12, 13 thiab analog pins A1, A2, A3, A4, A5 dawb.
Tsis tas li koj yuav tsum paub qhov sib piv qhov tseem ceeb ntawm txhua lub pob kom koj tuaj yeem txheeb xyuas lawv. Kuv nyeem A0 tus nqi thiab luam tawm ntawm cov ntawv xov xwm kom paub. Nov yog tus qauv piv txwv:
int btn_value = 0;
teeb tsa tsis muaj dab tsi () {Serial.begin (9600); } tsis muaj dab tsi voj () {btn_value = analogRead (A0); Serial.println (btn_value); }
Nov yog qhov muaj txiaj ntsig uas kuv pom rau kuv daim ntaub thaiv:
- Txoj cai khawm - 0
- Khawm Up - 131
- Khawm Down - 306
- Khawm Sab laug - 481
- Xaiv Khawm - 722
- Tsis muaj khawm - 1023
Kauj Ruam 3: Tsim Circuit Court
Lub voj voog yog yooj yim zoo nkauj.
- Muab koj lub buzzer tso rau ntawm qhov chaw ntawm lub khob cij.
- Txuas ib sab ntawm 330 ohm resistor rau tus pin tsis zoo ntawm lub buzzer thiab lwm sab rau hauv av pin ntawm Arduino.
- Txuas tus pin zoo ntawm tus buzzer rau tus pin2 ntawm Arduino.
Koj ua tiav lawm! Tam sim no cia peb mus rau qhov coding.
Kauj ruam 4: Code
Thaum koj qhib cov ntawv khaws cia, koj yuav pom cov ntaub ntawv hauv qab no; lcd_keypad_songs, fur_elise, james_bond, jingle_bells, mario_bros_theme, mario_bros_underworld, merry_christmas, pitches.h
- lcd_keypad_songs yog cov ntaub ntawv tseem ceeb uas cov ntawv qhia zaub mov thiab cov ntsiab lus tau sau. Nws tau sau nrog cov lus kom koj tuaj yeem tshuaj xyuas thiab nkag siab cov cai.
- pitches.h suav nrog lub ntsiab lus ntawm kev sau nkauj.
- So ntawm cov ntaub ntawv suav nrog kev ua haujlwm ntawm cov nkauj. Koj tuaj yeem hla dhau lawv thiab sim nkag siab. Kuv tsis tau sau cov lej rau cov nkauj, Kuv pom lawv los ntawm kev tshawb nrhiav. Yog li koj tseem tuaj yeem pom lossis sau koj cov nkauj thiab ntxiv rau hauv cov ntawv qhia zaub mov.
Koj yuav tsum muab lawv tso rau hauv tib daim nplaub tshev. Tom qab ntawd koj yuav tsum qhib lcd_keypad_songs cov ntaub ntawv nrog Arduino IDE thiab xa cov cai.
Nco tseg: james_bond nkauj tsis nyob hauv cov ntawv qhia zaub mov (nws tau hais tawm). Qhov no yog vim tias Arduino muaj qhov txwv tsawg thiab cov nkauj no siv ntau lub cim xeeb. Koj tuaj yeem tsis pom zoo nws thiab tawm tswv yim lwm zaj nkauj los mloog. Koj kuj yuav tsum tau hloov cov ntawv qhia zaub mov.
Kauj ruam 5: Ua tiav
Nrog koj zoo siab
Koj tau ua nws. Yog tias koj muaj lus nug lossis teeb meem, xav tawm tswv yim lossis xa lus rau kuv. Kuv xav pab.
Zoo Siab Ua!
Pom zoo:
POCKET MUSIC PLAYER: 6 Kauj Ruam
POCKET MUSIC PLAYER: Hauv cov lus qhia no koj yuav kawm paub yuav ua li cas thiaj ua rau koj tus kheej DIY hnab tshos suab paj nruag player nrog ncua kev ua si hla thiab tej zaum yuav muaj lwm yam siv siv arduino pro mini lossis arduino nano
Yuav Ua Li Cas MP3 Player Nrog LCD Siv Arduino thiab DFPlayer Mini MP3 Player Module: 6 Kauj Ruam
Yuav Ua Li Cas MP3 Player Nrog LCD Siv Arduino thiab DFPlayer Mini MP3 Player Module: Hnub no peb yuav ua MP3 player nrog LCD siv Arduino thiab DFPlayer mini MP3 Player Module. thiab ua si zoo ib yam li lub cuab yeej 10 xyoo dhau los. Thiab nws tseem muaj nkauj yav dhau los thiab nkauj tom ntej lom zem
Juuke - RFID Music Player rau Cov Laus thiab Cov Menyuam: 10 Kauj Ruam (nrog Duab)
Juuke - RFID Music Player rau Cov Laus thiab Cov Menyuam: Nov yog Juuke lub thawv. Lub thawv Juuke yog koj tus phooj ywg suab paj nruag, ua kom yooj yim li siv tau. Nws tshwj xeeb tshaj yog tsim los siv los ntawm cov neeg laus thiab menyuam yaus, tab sis tuaj yeem siv tau los ntawm txhua lub hnub nyoog. Qhov laj thawj peb tsim qhov no, yog vim
AdaBox004 Music Player: 4 Kauj Ruam
AdaBox004 Music Player: Kuv tau siv cov khoom hauv AdaBox004 los ua lub suab paj nruag yooj yim. Nws ntsaws rau hauv USB chaw nres nkoj thiab pib ua nkauj tsis zoo los ntawm daim npav micro SD. Nws yog rau kuv qhov kev cob qhia rau qhov tsis muaj fuss qhov ntawm upbeat nkauj
Tsis siv neeg Music Player: 5 Kauj Ruam
Tsis Siv Neeg Music Player: Koj puas tau hnov zoo li ua suab paj nruag kom pab koj lub cev so thiab npaj pw tsaug zog? Thaum twg koj hnov nkees tom qab ua haujlwm ntau ntawm koj lub laptop, tso koj lub laptop qhib thiab tsuas yog tua lub teeb thiab dhia saum txaj. Lub tshuab no yuav tsis siv neeg