Cov txheej txheem:
- Khoom siv
- Kauj ruam 1: Xaiv Koj Cov Chaw Taws Teeb
- Kauj Ruam 2: Tsim Nws ntawm Pawg Cij Ua Ntej Ua Ntej (Tsis Xav Tau Tab sis Pom Zoo)
- Kauj Ruam 3: Txoj Cai
- Kauj ruam 4: Ua tiav
- Kauj Ruam 5: TEST
Video: Arduino Nano Baised IR Tswj RGB LED: 5 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:25
hauv qhov haujlwm me no kuv xav qhia koj li cas kuv tsim Arduino raws RGB LED uas tau tswj los ntawm IR chaw taws teeb thiab siv los ntawm USB cable.
Khoom siv
1. RGB LED
2. IR tus txais
3. USB cable
4. Arduino nano
5. IR chaw taws teeb
6. qee cov xov hlau
7. 50-100 ohm resistors (kuv siv 47 ohm resistors tab sis tsis muaj qhov sib txawv ntau)
Kauj ruam 1: Xaiv Koj Cov Chaw Taws Teeb
Yog li qhov chaw nyob twg koj siv yog koj qhov kev txiav txim siab, tab sis koj lub chaw taws teeb yuav tsum muaj 6 tus yuam sij uas koj xav siv. 2 ntawm lawv yog rau Liab, 2 ntawm lawv rau Ntsuab thiab 2 rau Xiav.
Kauj Ruam 2: Tsim Nws ntawm Pawg Cij Ua Ntej Ua Ntej (Tsis Xav Tau Tab sis Pom Zoo)
Tam sim no, tsim lub Circuit Court ntawm daim ntawv qhia zaub mov
kev sib txuas:
RGB LED GND> Arduino nano GND
RGB LED Liab> Arduino nano Digital pin 5
RGB LED Ntsuab> Arduino nano Digital tus pin 6
RGB LED Xiav> Arduino nano Digital pin 9
USB GND> Arduino nano GND
USB 5v> Arduino nano 5v
IR tus pin 1> Arduino nano Digital tus pin 4
IR tus pin 2> Arduino nano GND
IR tus pin 3> Arduino nano 5v
(txhua qhov kev sib txuas tau qhia saum toj no)
(txhua tus lej xim ntawm RGB LED txuas nrog koob rau cov tiv thaiv)
Kauj Ruam 3: Txoj Cai
code yog cov hauv qab no:
Nov yog lub tsev qiv ntawv uas kuv tau siv.
#suav nrog
int IR_Recv = 4; // IR tus pin
int Rauv = 0; int Gval = 0; int IB = 0; int RvalDemo = 0; int GvalDemo = 0; int BvalDemo = 0; int R = 5; // Liab pin int G = 6; // Ntsuab tus pin int B = 9; // Tus lej xiav #define Rup1 1976685926 // ua rau lub teeb liab nce mus #define Rup2 3772818013 // ua rau lub teeb liab nce mus #define Rdown1 3843765582 // ua rau lub teeb liab poob qis #define Rdown2 3772813933 // ua rau lub teeb liab poob qis #define Gup1 3772797613 // ua rau lub teeb ci ntsuab nce mus #define Gup2 3774104872 // ua kom lub teeb ci ntsuab nce mus #define Gdown1 3772834333 // ua rau lub teeb ci ntsuab poob qis #define Gdown2 1784778242 // ua kom pom kev ntsuab ntsuab poob qis #define Bup1 3980777284 // ua rau xiav ci ntsa iab nce mus #define Bup2 3772781293 // ua rau lub teeb ci ntsa iab nce mus #define Bdown1 3772801693 // ua rau lub teeb ci ntsa iab poob qis #define Bdown2 3361986248 // ua rau lub teeb ci ci mus qis // NCO TSEG: Koj yuav tsum hloov tus lej rau koj tus kheej !!! ! // Kuv muaj 2 tus lej sib piv piv txwv Rup1 thiab Rup2. vim // kuv cov chaw taws teeb tso tawm 2 tus lej thaum koj nias ib qho. // hauv koj rooj plaub koj tuaj yeem tso tus lej tib yam hauv Rup1 thiab Rup2, Gup1 thiab Gup2 thiab ib qho. // Thaum koj nias tus yuam sij tus lej yuav tsum tshwm hauv Serial monitor, // Qhov ntawd yog yam koj yuav tsum ntaus hauv "#define" ntu. IRrecv irrecv (IR_Recv); decode_results cov txiaj ntsig; void setup () {TCCR2A = _BV (COM2A1) | _BV (COM2B1) | _BV (WGM21) | _BV (WGM20); TCCR2B = _BV (CS22); irrecv.enableIRIn (); pinMode (R, OUTPUT); pinMode (G, OUTPUT); pinMode (B, NTAWV); Serial.begin (9600); } void loop () {if (irrecv.decode (& results)) {ntev int decCode = results.value; hloov (results.value) {/////////// RED case Rup1: Rval = Rval + 10; tawg; rooj plaub Rup2: Rval = Rval + 10; tawg; case Rdown1: Rval = Rval - 10; tawg; case Rdown2: Rval = Rval - 10; tawg; //////////// GREEN case Gup1: Gval = Gval + 10; tawg; rooj plaub Gup2: Gval = Gval + 10; tawg; rooj plaub Gdown1: Gval = Gval - 10; tawg; rooj plaub Gdown2: Gval = Gval - 10; tawg; ///////////// BLUE case Bup1: Bval = Bval + 10; tawg; rooj plaub Bup2: Bval = Bval + 10; tawg; rooj Bdown1: Bval = Bval - 10; tawg; rooj Bdown2: Bval = Bval - 10; tawg; //////////////////////////////////////////} irrecv.resume (); } yog (Rval> 255) (Rval = 255); yog (Rauv 255) (Gval = 255); yog (Gval 255) (Bval = 255); yog (Bval <0) (Bval = 0); analogWrite (R, Rval); analogWrite (G, Gval); analogWrite (B, Bval); Serial.println (results.value); qeebMicroseconds (1); }
Kauj ruam 4: Ua tiav
Kuv tsis tau ua txoj haujlwm zoo ntawm lub casing. txhua yam kuv tau ua tsuas yog kaw nws, tab sis kuv sim ua kom nws me me li sai tau.
Yog tias koj muaj lus nug lossis ib qho yuam kev nco ntsoov qhia rau kuv, kuv yuav ua qhov zoo tshaj los pab koj kho qhov yuam kev. ua tsaug rau kev nyeem ntawv.
Pom zoo:
Hloov kho RGBW LED Sawb Tus Tswj, PIR Tswj, ESP8285: 3 Cov Kauj Ruam
Hloov kho RGBW LED Sawb Tus Tswj, PIR Tswj, ESP8285: Saum kuv lub rooj tom tsev Kuv tau teeb tsa RGBW LED sawb. WiFi LED RGBW maub los yuav tsum ua haujlwm nrog app zoo li Magic Home app. Txawm li cas los xij, Kuv muaj ESP8285 nti uas kuv tau ua nrog kuv tus kheej firmware. Kuv ntxiv PIR los ntawm qhov uas LED sawb hloov
Tsheb Tswj Chaw Taws Teeb - Tswj Kev Siv Wireless Xbox 360 Tus Tswj: 5 Kauj Ruam
Lub Tsheb Tswj Chaw Taws Teeb - Tswj Kev Siv Wireless Xbox 360 Tus Tswj: Cov no yog cov lus qhia txhawm rau tsim koj tus kheej lub tsheb tswj chaw taws teeb, tswj siv wireless Xbox 360 maub los
ESP8266 RGB LED Sawb WIFI Tswj - NODEMCU Raws li IR Chaw Taws Teeb rau Led Sawb Tswj Hauv Wifi - RGB LED Sawb Smartphone Tswj: 4 Cov Kauj Ruam
ESP8266 RGB LED Sawb WIFI Tswj | NODEMCU Raws li IR Chaw Taws Teeb rau Led Sawb Tswj Hauv Wifi | RGB LED Sawb Smartphone Tswj: Nyob zoo cov neeg hauv qhov kev qhia no peb yuav kawm paub siv nodemcu lossis esp8266 li IR chaw taws teeb los tswj RGB LED sawb thiab Nodemcu yuav raug tswj los ntawm smartphone dhau wifi. Yog li hauv paus koj tuaj yeem tswj RGB LED Sawb nrog koj lub xov tooj
Yuav Ua Li Cas Tswj Drone Quadcopter Brushless DC Tsav (3 Hom Hluav Taws Xob) los ntawm Kev Siv HW30A Lub Cev Muaj Zog Tswj thiab Arduino UNO: 5 Cov Kauj Ruam
Yuav Ua Li Cas Tswj Drone Quadcopter Brushless DC Tsav (3 Hom Hluav Taws Xob) los ntawm Kev Siv HW30A Lub Cev Muaj Zog Tswj thiab Arduino UNO: Nqe lus piav qhia: HW30A Lub Cev Muaj Zog Ceev tuaj yeem siv nrog 4-10 NiMH/NiCd lossis 2-3 cell LiPo roj teeb. BEC ua haujlwm tau zoo txog li 3 LiPo cells. Nws tuaj yeem siv los tswj kev nrawm ntawm Brushless DC lub cev muaj zog (3 xov hlau) nrog siab txog li 12Vdc.Specific
Begging Neeg Hlau Nrog Saib Xyuas Lub Ntsej Muag thiab Tswj los ntawm Xbox Tus Tswj - Arduino: 9 Cov Kauj Ruam (nrog Duab)
Begging Robot Nrog Lub ntsej muag taug qab thiab Tswj los ntawm Xbox Controller - Arduino: Peb tab tom yuav ua tus thov neeg hlau. Tus neeg hlau no yuav sim ua rau khaus lossis ua rau pom kev dhau ntawm tib neeg. Nws yuav ntes lawv lub ntsej muag thiab sim tua lasers ntawm lawv. Yog tias koj muab tus neeg hlau ib npib, nws yuav hu nkauj thiab seev cev. Tus neeg hlau yuav xav tau