Cov txheej txheem:
- Kauj Ruam 1: Qhov Chaw
- Kauj ruam 2: Code
- Kauj ruam 3: Hloov Cov Ntaub Ntawv Suab
- Kauj ruam 4: Daim duab
- Kauj Ruam 5: Cov txiaj ntsig
Video: Ua Si Nkauj Nrog Arduino!: 5 Kauj Ruam (nrog Duab)
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:28
Hauv cov lus qhia no kuv yuav qhia koj li cas kuv ua suab paj nruag siv Arduino UNO thiab SD Card module.
Peb yuav siv SPI Kev Sib Txuas Lus.
Cia peb pib!
Kauj Ruam 1: Qhov Chaw
Peb yuav xav tau cov hauv qab no:
Arduino UAS
SD Card Nyeem Ntawv
Jumper Hlau
Suab Amplifier
Hais lus
Kauj ruam 2: Code
Cov cai nws yooj yim heev, koj tuaj yeem siv nws los ua suab nkauj zoo nkauj uas nyob hauv SD Card tab sis nrog cov hom tshwj xeeb, uas yog nyob rau theem tom ntej.
Koj yuav tsum rub tawm txhua lub tsev qiv ntawv frist, yog tias koj twb muaj nws ces tsuas yog luam thiab muab tshuaj txhuam:
#suav nrog "SD.h" // SD tsev qiv ntawv#txhais SD_ChipSelectPin 4 // Xaiv tus lej SS rau SD module
#suav nrog "SPI.h"
#suav nrog "TMRpcm.h" // Lub tsev qiv ntawv los ua cov ntaub ntawv audio
TMRpcm Nco; // Ntawm no koj tso lub npe koj xav tau
void teeb tsa () {
Serial.begin (9600); // Pib serial com
yog tias (! SD.begin (SD_ChipSelectPin)) {// Yog tias tus lej SS nyob hauv lub xeev LOW nws yuav xa lus tsis pom Serial.println ("SD tsis ua");
rov qab;
}
Memoria.speakerPin = 9; // Tus pin uas koj yuav tso tus hais lus, feem ntau yog 9
}
void voj () {
Memoria.setVolume (5); // Koj tuaj yeem teeb lub ntim ntawm no txog 7
Memoria.quality (1); // tsuas yog lees txais 1 lossis 0, 1 yog rau qhov ua tau zoo dua
Memoria.play ("1.wav"); // Ntawm no koj tso lub npe ntawm koj lub suab
ncua (10000); // Qhov kev ncua no yuav tsum yog yam tsawg ib yam ntawm koj lub suab, // Lub tsev qiv ntawv no tuaj yeem ua suab paj nruag thaum lub arduino nyob hauv lwm txoj haujlwm yog li koj tuaj yeem ua nws keeb kwm yav dhau
// lossis tos kom lub suab tiav
}
Kauj ruam 3: Hloov Cov Ntaub Ntawv Suab
Qhov no yuav ua haujlwm nrog.wav cov ntaub ntawv audio tab sis koj yuav tsum ua som kev txiav txim siab rau nws.
Rau qhov ntawd koj tuaj yeem siv cov hloov pauv online hauv qab no.
audio.online-convert.com/convert-to-wav
Yog li, hauv nplooj ntawv no koj yuav tsum hloov pauv qhov chaw zoo li tau qhia hauv daim duab ces koj tsuas yog nyem rau hauv "Hloov Cov Ntaub Ntawv" thiab tos kom txog thaum hloov pauv tau ua tiav thiab rub tawm cov ntawv tshiab!
Tom qab ntawd koj yuav tsum tso tag nrho cov ntaub ntawv audio no rau ntawm daim npav SD thiab ntsaws nws rau hauv cov qauv arduino.
Kuj tseem muaj lwm qhov tshwj xeeb ntawm lub tsev qiv ntawv no zoo li hauv daim duab saum toj no yog li koj tuaj yeem siv nws thiab ua lub tshuab ntaus nkauj nrog cov nyees khawm rau ntim, nkauj tom ntej thiab lwm yam, thiab lwm yam zoo li koj xav tau! Ntuj yog qhov txwv!
Kauj ruam 4: Daim duab
Nov yog tus pin teeb rau arduino thiab SD module:
Arduino >>>>>>> SD Module
4 >>>>>>>>>>>> SSS
11 >>>>>>>>>> MOSI
12 >>>>>>>>>> MISO
13 >>>>>>>>>> SCK
5v >>>>>>>>>> 5v
Gnd>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> thiab tshaj thiab zoo tshaj, Gnd
9 >>>>>>>>>> PWM Audio Out
Lub suab tso tawm tuaj yeem txuas nrog lub suab hais lus nrov nrov vim tias lub zog qis, thiab kev siv kom raug tuaj yeem ua rau arduino puas tsuaj yog tias koj txuas ncaj qha.
Thiab … koj ua tiav!
Qhia rau kuv paub yog tias koj muaj kev ua xyem xyav, Kuv yuav zoo siab los teb, Ua tsaug rau kev nyeem kuv instrctable!
Kauj Ruam 5: Cov txiaj ntsig
Yog tias koj muaj lub osciloscope koj yuav tsum tuaj yeem pom PWM teeb liab ntawm lub suab tso tawm zoo li no.
Thiab … koj ua tiav!
Qhia rau kuv paub yog tias koj muaj kev ua xyem xyav, Kuv yuav zoo siab los teb, Ua tsaug rau kev nyeem kuv cov lus qhia!
Pom zoo:
PUBG Ntsiab Lus Nkauj+Ua Duab Nrog Arduino !: 13 Kauj Ruam (nrog Duab)
PUBG Ntsiab Lus Nkauj+Ua Duab Nrog Arduino!: Nyob zoo thiab txais tos rau qhov kev qhia lom zem no! Kuv vam tias koj txhua tus nyob zoo thiab nyob zoo. Qhov haujlwm me me tab sis zoo kawg yog hais txog kev ua nkauj PUBG lub ntsiab lus nkauj thiab txawm tsim qee qhov kev ua si animations siv arduino.Qhov khoom siv tau zoo heev
Yuav Ua Li Cas Code Ib Zaj Nkauj Siv Cov Ntawv Nkauj hauv Sonic Pi: 5 Kauj Ruam
Yuav Ua Li Cas Code Ib Zaj Nkauj Siv Cov Ntawv Nkauj hauv Sonic Pi: Cov lus qhia no yog yuav piav qhia qee cov kauj ruam yooj yim thiab cov cai ntawm kev siv thaum sau cov nkauj hauv Sonic Pi siv cov ntawv nkauj! Muaj ntau lab lwm daim ntawm cov cai los sim ntxiv tsw rau koj daim ua tiav yog li nco ntsoov tseem ua si ib puag ncig y
Ua Nkauj (MP3) Nrog Arduino Siv PWM ntawm Tus Hais Lus lossis Flyback Transformer: 6 Cov Kauj Ruam (nrog Duab)
Ua Nkauj (MP3) Nrog Arduino Siv PWM ntawm Tus Hais Lus lossis Flyback Transformer: Nyob Zoo Cov Neeg, Qhov no yog kuv thawj zaug qhia, Kuv vam tias koj yuav nyiam Nws !! xa cov ntaub ntawv suab paj nruag los ntawm kuv lub laptop mus rau Arduino. Thiab siv Arduino TIMERS t
Ua Nkauj Nkauj Siv Stepper Motor !!: 11 Kauj Ruam (nrog Duab)
Ua Nkauj Nkauj Siv Stepper Motor !!: Txoj haujlwm no yog hais txog kev tsim cov txheej txheem yooj yim sib cuam tshuam, uas yuav tso cai rau cuam tshuam nrog lub tshuab stepper hauv ob txoj kev sib txawv. yooj yim GUI, uas h
Music Reactive Light -- Yuav Ua Li Cas Kom Yooj Yim Yooj Yim Suab Nkauj Reactive Teeb rau Ua Duab Awsome.: 5 Kauj Ruam (nrog Duab)
Music Reactive Light || Yuav Ua Li Cas Super Yooj Yim Music Reactive Light rau Ua Duab Awsome.: Hav whats up guys, Hnub no peb yuav tsim ib txoj haujlwm zoo heev. ntses bass thaj tsam uas yog qhov tsawg-zaus suab teeb liab. Nws yog qhov yooj yim heev los tsim.Peb yuav