Cov txheej txheem:

Electro Hat: 5 Kauj Ruam
Electro Hat: 5 Kauj Ruam

Video: Electro Hat: 5 Kauj Ruam

Video: Electro Hat: 5 Kauj Ruam
Video: 10 самых АТМОСФЕРНЫХ мест Дагестана. БОЛЬШОЙ ВЫПУСК #Дагестан #ПутешествиеПоДагестану 2024, Hlis ntuj nqeg
Anonim
Electro lub kaus mom
Electro lub kaus mom

Qhov no yuav yog qhov khoom kawg saib ua ntej, lossis tsawg kawg yog kuv cov khoom lag luam zaum kawg. Koj li tuaj yeem sib txawv ntau dua li kuv nyob ntawm seb lub kaus mom zoo li cas nrog LED ntau npaum li cas los ntawm cov hlua LED uas yuav hais hauv qab no yuav raug siv.

Kauj ruam 1: Cov ntaub ntawv

Khoom siv
Khoom siv

Ntawm no peb yuav pib nrog qee cov ntaub ntawv uas yuav xav tau, raws li pom hauv daim duab yog:

1x Lub kaus mom (https://smile.amazon.com/gp/product/B004SSVMP2/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1) nco tseg: lub kaus mom no tsis tau siv rau hauv cov khoom kawg vim qhov teeb meem tsis tau pom dua, lub kaus mom Kuv tau siv qhov kawg tuaj yeem pom ntawm no:

1x LED Sawb (Tshwj xeeb yog WS2812B uas tuaj yeem pom ntawm no:

1x 2.1x5.5mm Txiv neej DC Lub Hwj Huam Plug rau 9V Roj Teeb Khawm Txuas Txuas Cable (https://www.amazon.com/2-1x5-5mm-Power-Battery-Button-Connector/dp/B005D65LEG/ref=pd_lpo_vtph_147_lp_t_3?_encoding= UTF8 & psc = 1 & refRID = FTYYJGE5584QFBGZ2SM2)

1x Arduino Uno (https://store.arduino.cc/usa/arduino-uno-rev3)

1x 150 Ohm Resistor (https://www.radioshack.com/products/radioshack-150-ohm-1-2w-5-carbon-film-resistor-pk-5)

1x Photoresistor (https://smile.amazon.com/gp/product/B016D737Y4/ref=oh_aui_detailpage_o01_s00?ie=UTF8&psc=1)

Kauj Ruam 2: Pib Ua Haujlwm ntawm Lub Hnab

Pib Ua Haujlwm ntawm Lub Hnab
Pib Ua Haujlwm ntawm Lub Hnab

Txhawm rau pib, yog tias koj yuav yuav lub kaus mom kaus raws li tau npaj tseg. Tom qab ntawd koj yuav xav kho lub kaus mom kom haum rau koj nyiam uas koj xav tias zoo tshaj qhov koj xav tau rau LED sawb nrog rau qhov chaw rau arduino, roj teeb, xov hlau thiab xov tooj, thiab qee yam khoom muaj peev xwm ib yam nkaus. Dab tsi tuaj yeem pom saum toj no yog qhov kuv tau xub npaj ua haujlwm nrog tab sis tsis ua haujlwm zoo li qhov kuv xav yog li kuv tau mus tom ntej thiab mus nrog kuv txoj kev npaj thaub qab uas yog lub kaus mom floppy raws li txuas ua ntej.

Kauj Ruam 3: Puas Muaj Dab Tsi Ntxiv?

Yog li tam sim no txhua yam tau sib sau ua ke thiab koj tau ua qhov koj xav ua rau koj lub kaus mom muaj qee yam uas ploj lawm uas tseem tsis tau kov thiab qhov ntawd yog … koj twv nws, ua haujlwm Arduino Uno.

Ib phau ntawv qhia muaj txiaj ntsig tiag tiag uas kuv tau nrhiav pom los pab nrog cov neeg siv Mac nyob ntawd (Mac tus tswv sib tw!

Qhov txuas no yuav pab koj pib nrog teeb tsa arduino rau mac.

Thaum koj xub qhib lub software arduino tom qab rub tawm thiab teeb tsa (txuas:

Koj yuav xav mus rau hauv cov cuab yeej ntu hauv cov haujlwm ua haujlwm thiab nco ntsoov xyuas tias lub rooj tsav xwm arduino raug thiab raug xaiv (rau Macs rau chaw nres nkoj nws yuav tsum hais txog usbmodem). Tom qab lub taub hau mus rau qhov nyiam ntawm Arduino thiab xaiv qhov chaw koj xav tau txhua yam ntawm koj "kos duab" koj xav kom tau txais kev cawmdim thiab nyob qhov twg. Kuv pom zoo tsim cov ntawv npe "Arduino" thiab txuag nws mus rau sab nraud hard drive yog tias koj muaj ib qho. (kuv lub hard drive sab nraud yog tias leej twg xav tau ib qho:

Thaum cov ntaub ntawv raug tsim peb tuaj yeem thaum kawg ua haujlwm, yog tias koj tau mus yuav cov hlua LED uas kuv tau siv ces koj yuav xav rub lub tsev qiv ntawv Adafrui_Neopixel uas tuaj yeem pom ntawm no: https://learn.adafruit.com/adafruit -neopixel-uber… nyeem ntxiv

Tam sim no peb tuaj yeem mus rau qhov lom zem! Qhov tseeb coding !!

Tam sim no kom yooj yim Kuv tsuas yog mus tom ntej thiab muab koj cov cai uas kuv tau siv los pab txuag koj qee lub sijhawm rau cov txheej txheem no: (hint: rub tawm.ino cov ntawv, qhov no yog arduino program file nrog coding rau Electro Lub kaus mom)

Kauj Ruam 4: Tam Sim No Uas Koj Muaj Koj Li Coding Nws yog Lub Sijhawm Kom Muaj Kev Lom Zem

Tam sim no koj muaj koj tus lej Nws yog lub sijhawm kom muaj kev lom zem
Tam sim no koj muaj koj tus lej Nws yog lub sijhawm kom muaj kev lom zem
Tam sim no koj muaj koj tus lej Nws yog lub sijhawm kom muaj kev lom zem
Tam sim no koj muaj koj tus lej Nws yog lub sijhawm kom muaj kev lom zem

Tam sim no tias cov lej tau ua tiav (koj tsis tas yuav tsum ua haujlwm hnyav) koj yuav tsum nyob ze rau qhov khoom kawg. Tom qab coding Arduino txhua yam uas tau ua dhau los yog hloov kho pes tsawg LED's los ntawm kab txaij uas koj siv (hint: hloov tus lej los ntawm #define NUMPIXELS) koj tuaj yeem thaum kawg los txog rau qib kawg.

Thaum cov coding tau ua tiav, yooj yim tso lub teeb qhov twg koj xav kom lawv mus (Kuv tsis xav kom tshem cov nplaum tawm tsis tau) teeb tsa lawv nyob rau hauv qhov chaw thuam uas koj xav sim thiab tom qab ntawd sim teeb kom ua paub tseeb tias koj yuav ua tiav qhov cuam tshuam uas koj yuav mus. Thaum koj zoo siab nrog qhov txiaj ntsig koj yuav ua tiav, tshem cov nplaum rov qab thiab maj mam muab koj lub teeb LED tso rau hauv txoj haujlwm uas koj xav tau ua ntej. TA-DAO! Tam sim no koj tau ua tiav lub kaus mom hluav taws xob. Kuv vam tias koj nyiam qhov tsis yooj yim no thiab kuv vam tias nws yog ib qho yooj yim ua raws.

Kauj ruam 5: Ua tiav

Qhov ntawd yooj yim tam sim no tsis yog nws? Vam tias qhov kev lees paub no tau pab tsawg kawg me ntsis. Kuv txaus siab rau cov lus tawm tswv yim thiab kev thuam thuam (qhov no tsuas yog kuv thawj zaug qhia thiab kuv txaus siab rau txhua lub sijhawm uas koj yuav tau.) Rov qab los tam sim no ya ntawm no?

Pom zoo: