Cov txheej txheem:

Tsav RGB LED Sawb Siv Arduino: 4 Kauj Ruam
Tsav RGB LED Sawb Siv Arduino: 4 Kauj Ruam

Video: Tsav RGB LED Sawb Siv Arduino: 4 Kauj Ruam

Video: Tsav RGB LED Sawb Siv Arduino: 4 Kauj Ruam
Video: STC Biology Department Speaker Series 2024, Kaum ib hlis
Anonim
Tsav RGB LED Sawb Siv Arduino
Tsav RGB LED Sawb Siv Arduino

Nyob Zoo Cov Menyuam hauv cov lus qhia no peb yuav ua lub Circuit Court los khiav 12V RGB coj sawb nrog arduino. Raws li peb kniw arduino tsis tuaj yeem muaj zog txaus los ua ib RGB coj sawb yog li peb yuav tsum ua kom nrov arduino lub teeb liab kom muaj zog rau Led Sawb los ntawm lwm qhov chaw yog li peb yuav siv TIP120 Transistor nrog arduino los ua kom nrov arduino lub zog hluav taws xob me me rau hauv lub zog xav tau teeb liab (12v) rau rgb coj sawb nrog 12v lub zog siv & Transistor.

Kauj Ruam 1: Yam Koj Xav Tau Rau Qhov No

Yam Koj Xav Tau Rau Qhov No
Yam Koj Xav Tau Rau Qhov No
Yam Koj Xav Tau Rau Qhov No
Yam Koj Xav Tau Rau Qhov No
Yam Koj Xav Tau Rau Qhov No
Yam Koj Xav Tau Rau Qhov No
Yam Koj Xav Tau Rau Qhov No
Yam Koj Xav Tau Rau Qhov No

Rau cov lus qhia no peb yuav xav tau cov khoom hauv qab no: TIP120: 12V ADAPTER: ARDUINO UNO: Ib 5m RGB Led stripMosfet irlzz4n lossis ib qho sib npaug lossis TSWV 120 bjt lossis sib npaug 3 potentiometer

Kauj ruam 2: Kev sib txuas

Kev sib txuas
Kev sib txuas
Kev sib txuas
Kev sib txuas

Cov schmatics tau muab hauv cov duab ib feem ntawm cov kauj ruam no. Thov ua raws li qhov qhia pom. Nws muaj 3 Transistors rau txhua 3 tus pin ntawm RGB coj kab txaij (1-1 txhua rau liab 'R', Ntsuab 'G', Xiav 'B') thiab 3 lub hwj chim ntsuas rau tswj txhua peb R, G & B tus pin teeb lub zog.

Kauj ruam 3: Code

Code
Code

Qhov coding yog ib qho yooj yim heev thov luam cov cai hauv qab no & Upload rau arduino.: teeb tsa tsis muaj dab tsi () {PinMode (9, 1); PinMode (10, 1); PinMode (11, 1);} int a, b, c; void loop () {a = digitalRead (A0); b = digitalRead (A1); c = digitalRead (A2); analogWrite (9, a/4); analogWrite (10, b/4); analogWrite (11, c/4);}

Kauj ruam 4: Xeem

Kev Xeem
Kev Xeem
Kev Xeem
Kev Xeem
Kev Xeem
Kev Xeem
Kev Xeem
Kev Xeem

Tom qab xa cov cai koj tuaj yeem tig ib lossis tag nrho cov peev xwm los nqa cov xim txhua lub zog muaj lub luag haujlwm rau Liab, ntsuab, xiav xim ntawm nws tus kheej thiab koj tuaj yeem tso qhov sib txawv sib txawv rau txhua peb lub zog kom tau txais cov xim uas xav tau hauv RGB coj sawb thiab koj Arduino raws RGB coj tus tsav tsheb tau npaj siv. Kho koj lub tsev thiab muaj kev lom zem.

Pom zoo: