Cov txheej txheem:

LEDs Kub thiab Vaum: 12 Kauj Ruam
LEDs Kub thiab Vaum: 12 Kauj Ruam

Video: LEDs Kub thiab Vaum: 12 Kauj Ruam

Video: LEDs Kub thiab Vaum: 12 Kauj Ruam
Video: Xav Ua Koj Niam Vauv/Tej Lim Nkauj Tshiab 2023-24/Official MV/Original Music 2024, Kaum ib hlis
Anonim
Kub thiab Vaum LEDs
Kub thiab Vaum LEDs

Yog tias koj ib txwm xav tau lub ntsuas cua pom ntau dua, txoj haujlwm no tuaj yeem pab tau. Peb yuav ua cov teeb ntawm LED uas tso saib qee yam xim raws qib ntawm cov av noo thiab qhov kub.

Kauj ruam 1: Cov ntaub ntawv

Khoom siv
Khoom siv

Rau qhov Project no Koj yuav xav tau:

- 2 RGB LEDs

- DHT11 Kev ntsuas kub thiab av noo

- 6 220Ω resistors

-12 breadboard jumpers (xov hlau)

- Arduino UNO R3

- Arduino IDE (rau coding)

- DHT Sensor Library (txhawm rau ua kom koj qhov ntsuas kub ua haujlwm)

Kauj Ruam 2: Txuas lub Breadboard

Txuas lub Breadboard
Txuas lub Breadboard

Kauj ruam 3:

Duab
Duab

Koj xav teeb tsa lub zog siv hluav taws xob kom raug rau txhua feem, yog li cia pib nrog hauv av thiab 5 qhov sib txuas sib txuas

Kauj ruam 4:

Duab
Duab

Tom ntej no, cia teeb tsa qhov ntsuas kub. Kuv txuas nrog 2 tus pin hauv Arduino uno

Kauj ruam 5:

Duab
Duab

Thaum kawg cia peb teeb tsa LEDs. Ob leeg muaj tib txoj kab hluav taws xob thiab tiv thaiv teeb tsa. Kuv tus pin rau LED sawv cev rau kev ntsuas kub yog ntawm 3, 5, thiab 6 thaum cov av noo LED tau teeb tsa ntawm tus pin 9, 10, thiab 11

Kauj Ruam 6:

Duab
Duab

Tam sim no koj muaj qhov ua tiav Circuit Court! Cia peb pib ua haujlwm ntawm txoj cai tso cai rau cov LED no kom paub qhov kub thiab txias.

Ua ntej, txheeb xyuas tus pin rau koj lub ntsuas kub thiab LEDs raws li koj tus pin thiab suav nrog lub tsev qiv ntawv rau qhov ntsuas kub. Txhawm rau suav nrog lub tsev qiv ntawv (hauv peb cov ntaub ntawv "DHT" yog peb lub tsev qiv ntawv xav tau), mus rau kab ntawv qhia zaub mov thiab xaiv "Sketch> suav nrog Tsev qiv ntawv> Ntxiv. ZIP Library" thiab xaiv "DHT" ZIP nplaub tshev los ntawm qhov koj rub tawm nws.

Kauj ruam 7: Coding

Coding
Coding
Coding
Coding

Kauj ruam 8:

Duab
Duab

Tom ntej no, Hauv Qhov Teeb Meem teeb tsa txiav txim siab qhov tso tawm rau ob qho tib si LEDs nrog rau kev saib xyuas txuas rau koj lub ntsuas.

Kauj ruam 9:

Duab
Duab

Hauv qhov tsis muaj dab tsi Loop, sau tawm qhov ua haujlwm ntawm koj tus lej saib. Nov yog qhov uas koj yuav ntsuas qhov ntsuas kub thiab av noo los ntawm kev ua haujlwm lub voj tom qab.

Kauj ruam 10:

Duab
Duab

Khiav Serial monitor los ntawm kev mus rau cov ntawv qhia zaub mov thiab xaiv "Cuab Yeej> Serial Monitor". Koj yuav tsum tau nyeem rau qhov kub thiab txias. Tos 30 vib nas this thiab sau cov lej uas tshwm ntau zaus rau qhov kub thiab txias. Tam sim no koj tau nyeem, peb tuaj yeem ntsaws cov txiaj ntsig no rau peb ntu ntu tom ntej ntawm cov cai

Kauj ruam 11:

Duab
Duab

Txhawm rau ua kom peb cov LEDs ci kom haum, peb yuav tsum sau qee cov lus "lwm". Nyeem qhov koj tau ntsuas kub thiab ntsaws rau hauv thawj kab lus ntawm kab lus. Yog tias qhov ntsuas kub siab dua li tus nqi tau muab, lub teeb yuav tig liab. Txwv tsis pub nws yuav nyob twj ywm xiav. Tib yam siv rau cov av noo. Yog tias kev nyeem ntawv siab dua li tus nqi koj tau ua, lub teeb tig liab. Txwv tsis pub nws yuav nyob twj ywm xiav.

Kauj ruam 12: Ua tiav

Tam sim no koj muaj koj tus kheej qhov ntsuas kub thiab av noo paub txog LEDs!

Pom zoo: