Cov txheej txheem:

Khiav LED Tshav Dav Hlau Khiav Tawm: 7 Kauj Ruam
Khiav LED Tshav Dav Hlau Khiav Tawm: 7 Kauj Ruam

Video: Khiav LED Tshav Dav Hlau Khiav Tawm: 7 Kauj Ruam

Video: Khiav LED Tshav Dav Hlau Khiav Tawm: 7 Kauj Ruam
Video: Tswv Yexus lub neej thaum pib txug thaum xaus 2024, Kaum ib hlis
Anonim
Image
Image
Khiav LED Tshav Dav Hlau Khiav
Khiav LED Tshav Dav Hlau Khiav

Nov yog qhov hloov kho tshiab thiab kev tshoov siab los ntawm

Kuv hloov qhov chaws los ua kom lub teeb ci rov qab thiab tawm mus, thiab qeeb dua.

Nov yog tes ua qauv ntawm Tshav Dav Hlau Runway.

Kauj Ruam 1: Cov Cuab Yeej

Cov cuab yeej
Cov cuab yeej
Cov cuab yeej
Cov cuab yeej

Txhawm rau ua tus qauv ntawm Khiav LED tshav dav hlau khiav, koj xav tau:

1 Arduino (Leonardo)

1 Cov qhob cij

12 x 15mm LEDS

13 Xov

24 Extension Hlau

1 lub thawv khau khoob

1 Txheem Hom-A USB

1 100 Ohm resistor

Tom qab muaj cov cuab yeej no, koj tuaj yeem kho lub thawv los ntawm daim ntawv xim.

Kauj ruam 2: Ua Nws

Ua Kom Nws!
Ua Kom Nws!
Ua Kom Nws!
Ua Kom Nws!
Ua Kom Nws!
Ua Kom Nws!

Ua ntej koj yuav tsum txuas cov LEDs rau Arduino los ntawm kev siv xov hlau. Txhua lub LED yuav tsum txuas los ntawm ob lub xov hlau, ib qho txuas mus rau Arduino, ib qho txuas mus rau qhov hluav taws xob tsis zoo. Thiab tso tus tiv thaiv kom thim qhov tam sim no dhau los ntawm LED.

Kauj ruam 3: Programming Up

Programming Up!
Programming Up!
Programming Up!
Programming Up!
Programming Up!
Programming Up!

Tshaj li cia qhov program nce! Ua ntej, koj tau sau cov txiaj ntsig rau pins, muaj 12 pins hauv qhov chaws no, los ntawm 2 txog 13. Qhov thib ob, koj yuav tsum sau ib qho dig dig siab sau thiab ib qho qis rau txhua LEDS, txhua LEDS yuav ncua 100ms. Qhov peb, koj yuav tsum ua raws cov kauj ruam dhau los sau nws los ntawm LED NO.2 mus rau LED NO.13, thiab sau nws rov qab los ntawm NO.13 txog NO.2. Yog tias koj tseem tsis meej pem yuav ua li cas rau nws, koj tuaj yeem ua raws cov kauj ruam los ntawm kev saib cov screenshots nyob ntawd lossis rub tawm qhov chaws, cov kab ntawv txuas hauv qab no.

Tau qhov twg los code:

Kauj Ruam 4: Hloov Cov Hluav Taws Xob rau Txuas Hluav Taws Xob

Hloov Cov Hluav Taws Xob rau Cov Hluav Taws Xob Hluav Taws Xob
Hloov Cov Hluav Taws Xob rau Cov Hluav Taws Xob Hluav Taws Xob
Hloov Cov Hluav Taws Xob rau Cov Hluav Taws Xob Hluav Taws Xob
Hloov Cov Hluav Taws Xob rau Cov Hluav Taws Xob Hluav Taws Xob
Hloov Cov Hluav Taws Xob rau Cov Hluav Taws Xob Hluav Taws Xob
Hloov Cov Hluav Taws Xob rau Cov Hluav Taws Xob Hluav Taws Xob
Hloov Cov Hluav Taws Xob rau Cov Hluav Taws Xob Hluav Taws Xob
Hloov Cov Hluav Taws Xob rau Cov Hluav Taws Xob Hluav Taws Xob

Tom qab ua tiav cov phiaj xwm, koj tuaj yeem xa koj cov lej chaws rau hauv koj li Arduino pawg thawj coj saib, thiab txheeb xyuas seb lub teeb puas tuaj yeem thim rov qab. Vim tias peb yuav tso Arduino board rau hauv lub thawv, yog li peb yuav tsum tso cov LEDS rau ntawm cov xov txuas txuas. Txhua LEDS yuav txuas rau ntawm ob txoj kab txuas txuas Kuv pom zoo kom koj xaiv tib xim txuas txuas txuas mus rau tib qho LED, nws yuav pab koj tso cov LEDS kom sai dua thiab ua haujlwm tau zoo dua. Tom qab hloov pauv cov xov hlau, koj tuaj yeem kaw ob lub xov txuas txuas ua ke kom nws zoo li kev teeb tsa.

Kauj ruam 5: Muab nws tso rau hauv ib lub thawv

Muab nws tso rau hauv ib lub thawv!
Muab nws tso rau hauv ib lub thawv!
Muab nws tso rau hauv ib lub thawv!
Muab nws tso rau hauv ib lub thawv!
Muab nws tso rau hauv ib lub thawv!
Muab nws tso rau hauv ib lub thawv!

Ua ntej tshaj, koj yuav tsum tau xaum 12 qhov (6 ntawm txhua sab) ntawm lub npov ntawm lub npov, lub qhov yuav tsum haum rau LED. Tom qab drilling nws, koj tuaj yeem muab Arduino tso rau hauv lub thawv. Yog li ntawd koj tuaj yeem tso cov LEDS rau hauv lub qhov nyob hauv qhov kev txiav txim, muaj 12 LEDS txuas rau ntawm daim ntawv tais, koj yuav tsum faib 2 LEDS rau hauv ib pawg, thiab muab tso rau hauv qhov rov qab kev taw qhia Tom qab ua tiav qhov tso, yuav tsum muaj 6 pawg ntawm LEDS ntsib ib leeg.

Kauj Ruam 6: Laum Lub Qhov rau Hom-A USB Kab

Laum Lub Qhov rau Hom-A USB Kab!
Laum Lub Qhov rau Hom-A USB Kab!
Laum Lub Qhov rau Hom-A USB Kab!
Laum Lub Qhov rau Hom-A USB Kab!
Laum Lub Qhov rau Hom-A USB Kab!
Laum Lub Qhov rau Hom-A USB Kab!

Tso LEDS lub teeb, peb yuav tsum them nws. Koj tuaj yeem laum ib lub qhov nyob rau sab ntawm lub npov kom cia lub cable them tawm. Los ntawm txoj kev, Arduino haum nrog Hom-A kab.

Kauj Ruam 7: Kaw Lub Box thiab Ua tiav

Image
Image
Kaw lub thawv thiab Ua tiav !!
Kaw lub thawv thiab Ua tiav !!
Kaw lub thawv thiab Ua tiav !!
Kaw lub thawv thiab Ua tiav !!

Tom qab drilling lub qhov rau them cable, koj tuaj yeem txuas koj lub xov tooj them nyiaj rau lub txhab nyiaj hluav taws xob. Thaum kawg koj tuaj yeem kaw lub thawv thiab ua tiav !!!

Pom zoo: