Cov txheej txheem:
Video: Project 2, Dimming LED: 3 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:28
Hauv txoj haujlwm no koj yuav kawm paub tswj hwm qhov ci ntawm LED nrog lub hwj chim li cas. Hauv txoj haujlwm no koj yuav raug qhia txog analogWrite, analogRead, thiab siv kev ua haujlwm int. Vam tias koj txaus siab rau nws, thiab nco ntsoov txheeb xyuas cov phiaj xwm yav dhau los uas muaj npe, Project 1, Blinking LED.
Kho vajtse yuav tsum tau:
- Arduino UAS
- Tsis Siv Neeg Breadboard
- Teb Potentiometer
- 6 jumper xov
- LED
- 220 ohm resistor
Software yuav tsum tau:
Arduino IDE Cov
Kauj ruam 1: Kho vajtse
Tsim lub Circuit ib yam li daim duab saum toj no.
Kauj ruam 2: Code
Tam sim no theej cov cai hauv qab no rau hauv Arduino IDE, yog tias koj tsis muaj nws muaj qhov txuas hauv qab ntawm nplooj ntawv.
int Sensorvalue = 0; // Qhia meej tias Sensorvalue sib npaug 0;
void teeb tsa () {
pinMode (8, NTAWV);
}
void voj () {
Sensorvalue = analogRead (A0); // Sensorvalue = tus pin A0, uas txuas nrog lub zog ntsuas
analogWrite (8, Sensorvalue/4); // siv analogWrite muaj nuj nqi peb tuaj yeem tswj tus pin 9 sai dua
}
Kauj ruam 3: Txheeb xyuas thiab Upload
Txheeb xyuas thiab xa koj cov cai rau koj li Arduino Code. Yog xav paub ntxiv txog qhov no txheeb xyuas kuv qhov haujlwm yav dhau los koj tuaj yeem pom qhov txuas hauv qab no. Thaum koj tus lej tau muab tso rau koj koj yuav tuaj yeem tswj qhov ci ntawm LED los ntawm kev tig lub hwj chim. Tam sim no tau muaj tswv yim. koj tuaj yeem sim tswj qhov nrawm ntawm lub tshuab dc siv ib qho.
Ntau txoj haujlwm yuav tawm los, nyob twj ywm thiab kawm paub yuav ua li cas thiaj nyeem tau deb, pom lub suab, ua si nco, tswb moos thiab ntau ntxiv.
Arduino IDE rub tawm:
www.arduino.cc/en/Main/Software
Kuv qhov project dhau los:
www.instructables.com/id/Project-1-Blinkin…
Pom zoo:
Skeleton With Dimming Red Eyes: 16 Kauj Ruam (nrog Duab)
Skeleton With Dimming Red Eyes: Leej twg tsis nyiam lub cev pob txha zoo rau Xus? Cov Lus Qhia no qhia yuav ua li cas tso ua ke ob lub qhov muag liab qab rau koj lub cev pob txha (lossis tsuas yog pob txha taub hau) uas ploj thiab ci dua, muab cov txiaj ntsig txaus ntshai rau koj cov lus dag lossis kws kho mob thiab lwm yam vi
PWM ESP32 - Dimming LED Nrog PWM ntawm ESP 32 Nrog Arduino IDE: 6 Kauj Ruam
PWM With ESP32 | Dimming LED Nrog PWM ntawm ESP 32 Nrog Arduino IDE: Hauv cov lus qhia no peb yuav pom yuav tsim PWM cov cim nrog ESP32 siv Arduino IDE & PWM feem ntau yog siv los tsim cov txiaj ntsig sib piv los ntawm ib qho MCU thiab cov txiaj ntsig sib piv tuaj yeem yog txhua yam ntawm 0V txog 3.3V (thaum esp32) & los ntawm
Dimming thiab ci ntsa iab LED nrog Arduino: 7 Kauj Ruam (nrog Duab)
Dimming thiab Ua kom pom lub ntsej muag LED nrog Arduino: Ua ntej koj pib tsim, koj yuav tsum tau txais cov ntaub ntawv raug: 1 Arduino Board - Kuv tau siv qhov poob ntawm Arduino Uno, tab sis nws ua haujlwm ib yam nkaus. 1 Potentiometer - kuv zoo li txawv dua li feem ntau, tab sis lawv kuj ua haujlwm tib yam. 1 Creadboard Ob peb
Plaub Xim LED Loj Hlob Lub Teeb Nrog PWM Dimming: 12 Cov Kauj Ruam (nrog Duab)
Plaub Xim LED Loj Hlob Lub Teeb Nrog PWM Dimming: Qhov no yog kev nthuav dav rau kuv yav dhau los teeb pom kev teeb tsa hauv lub PC chassis siv. Nws muaj plaub channel PWM dimming rau deb liab, liab, xiav, thiab dawb LEDs. Muaj peev xwm tswj cov xim sib xyaw sib xyaw txhais tau tias koj tuaj yeem tswj lub hauv paus kev loj hlob, nplooj
Dimming Illuminator- rau Lub Sijhawm Ib Leeg Ib Leeg Ib Leeg: 4 Kauj Ruam (nrog Duab)
Dimming Illuminator- rau Lub Sijhawm Lub Sijhawm Ib Leeg Lwm Yam.: Chav no tau los vim kuv tus poj niam yws yws tias nws tsis tuaj yeem pom lub moos chav pw thaum chav pw tsaus ntuj, thiab nws tsis xav tig lub teeb kom tsa kuv . Kuv tus poj niam tsis xav tau lub teeb pom kev ntawm lub moos, tsuas yog ligh txaus