Cov txheej txheem:

Tswj RGB Siv Tus Kheej Potentiometer!: 6 Cov Kauj Ruam
Tswj RGB Siv Tus Kheej Potentiometer!: 6 Cov Kauj Ruam

Video: Tswj RGB Siv Tus Kheej Potentiometer!: 6 Cov Kauj Ruam

Video: Tswj RGB Siv Tus Kheej Potentiometer!: 6 Cov Kauj Ruam
Video: Siv Excel Qhis laij ດອກເບ້ຍ Bank 2024, Kaum ib hlis
Anonim
Tswj RGB Siv Tus Kheej Potentiometer!
Tswj RGB Siv Tus Kheej Potentiometer!

Yuav hloov xim ntawm anode RGB LED nrog lub hwj chim li cas.

Kauj Ruam 1: Yam Koj Xav Tau

Kho vajtse Cheebtsam:

1. DFRobot Arduino UNO

2. DFRobot Jumper Wires

3. DFRobot Analog Rotation Sensor

4. DFRobot Analog Sensor Cable

5. DFRobot Breadboard-Plugin Resistor

6. RGB Diffused Common Cathode

RGB coj:

RGB LED txhais tau tias liab, xiav thiab ntsuab LEDs. RGB LED cov khoom lag luam ua ke peb cov xim no los tsim ntau dua 16 lab hues ntawm lub teeb. Nco ntsoov tias tsis yog txhua yam xim tuaj yeem ua tau. Qee cov xim yog "sab nraum" daim duab peb sab tsim los ntawm RGB LEDs. Tsis tas li, cov xim xim xws li xim av lossis xim liab yog qhov nyuaj, lossis tsis yooj yim sua, kom ua tiav.

Kauj Ruam 2: Anode/Cathode RGB LEDs

RGB LED yog ob hom, ib qho anode, thiab ntau cathode. Qhov sib txawv ntawm CC thiab CA yog, Nrog ib qho anode koj tuaj yeem txuas qhov anode mus rau +5v thiab txhua tus tib neeg LED rau tus tiv thaiv txhua. Txuas tus resistor rau tus pin tso zis. Tom qab ntawv sau LOW rau tus pin ntawd yuav qhib lub LED thiab HIGH yuav tua. Qhov no yog hu ua tam sim no

Nrog ib qho cathode ib txwm koj txuas cov cathode rau hauv av thiab txuas txhua qhov LED anode los ntawm tus tiv thaiv rau tus pin tso tawm. Tom qab ntawd HIGH tig nws rau. Qhov no hu ua kev xa khoom tam sim no.

Rov qab nco txog mnemonic ACID (Anode Tam Sim No Rau Hauv Ntaus Ntawv), peb tuaj yeem kwv yees tias ib qho anode RGB LED muaj tam sim no tsav ib tus pin, thiab tias ib qho cathode RGB LED tau muab tso rau ntawm ib tus pin. Txawm li cas los xij, qhov anode lossis cathode yuav yog qhov ntev tshaj plaws ntawm plaub tus pin los ntawm LED. Hmoov tsis zoo, cov txiv neej no ib txwm tsis tau hais meej meej tias lawv yog leej twg. Hauv qhov piv txwv no, Kuv tau ua haujlwm tawm qhov txuas rau ib qho anode RGB LED; feem ntau lwm cov lus qhia piav qhia txog kev txuas cathode.

Kauj Ruam 3: Kev Txuas Hluav Taws Xob

Qhov thaiv
Qhov thaiv

Koj tuaj yeem tsim cov duab kos zoo li no siv fritzing uas muaj pub dawb.

Kauj ruam 4: Code

Kauj Ruam 5: Rau Ntau Txoj Haujlwm:

Koj tuaj yeem mus ntsib kuv li Hackster Profile.

Pom zoo: