Cov txheej txheem:

Tswv Yim Zoo Siab Hnub Yug Zoo: 5 Kauj Ruam
Tswv Yim Zoo Siab Hnub Yug Zoo: 5 Kauj Ruam

Video: Tswv Yim Zoo Siab Hnub Yug Zoo: 5 Kauj Ruam

Video: Tswv Yim Zoo Siab Hnub Yug Zoo: 5 Kauj Ruam
Video: Zoo Siab Nrog Koj - Paj Tsua Thoj [ Official MV ] Nkauj Tawm Tshiab 2022 2024, Hlis ntuj nqeg
Anonim
Image
Image
Tswv Yim Zoo Siab Hnub Yug
Tswv Yim Zoo Siab Hnub Yug
Tswv Yim Zoo Siab Hnub Yug
Tswv Yim Zoo Siab Hnub Yug
Tswv Yim Zoo Siab Hnub Yug
Tswv Yim Zoo Siab Hnub Yug

Nov yog daim npav hnub yug lub tswv yim tsim rau koj cov phooj ywg thiab cov neeg hlub. Lub teeb LED ua piv txwv tus tswm ciab nyob hauv daim npav, thaum qhov dub puag ncig yog tus hais lus, tus hais lus yuav ua si nkauj hnub yug zoo siab. Ob zaj nkauj thiab lub teeb yuav raug tswj los ntawm Photoresistor, sim ua kom ze thiab qhib kev txav ntawm daim npav. Yog li thaum koj qhib daim npav, lub teeb yuav sim lub tswm ciab, thiab zaj nkauj hnub yug zoo siab yuav ua si tom qab. Daim npav yog daim npav hnub yug zoo siab, ncuav mog qab zib ntawm daim npav yog ncuav mog qab zib hnub yug zoo siab, nyob rau sab saum toj ntawm lub ncuav mog qab zib, muaj lus tswm ciab rau kov ntawm qhov muaj peev xwm. Lub zeem muag ntawm sab xis yog qhov kuv ntseeg cov menyuam zoo li thaum lawv saib lawv lub ncuav mog qab zib hnub yug. Nws tsis muaj teeb meem tiag tiag txawm hais tias cov neeg tuaj saib lub hom phiaj yog rau cov txwj laus lossis menyuam yaus, lub cim ntawm menyuam yaus saib lub hnub yug txhais tau tias tsis muaj txim txhaum uas peb txhua tus muaj thaum peb tseem yau.

Khoom siv

- Daim phiaj *1

- xov * 7

- txuas xov hlau*4

- hais lus (piezo) *1

- LED*1

- Photoresistor *1

- Tus tiv thaiv*2

- ntawv* 1

- xaum* 1

- Adapter* 1

- xaum xim*1

Kauj Ruam 1: Teeb Tus Photoresistor

Teeb tus Photoresistor
Teeb tus Photoresistor
Teeb tus Photoresistor
Teeb tus Photoresistor
Teeb Tus Photoresistor
Teeb Tus Photoresistor

Ua ntej koj teeb tus photoresistor, nco ntsoov txuas cov xov hlau (pom hauv daim duab 1), txuas qhov zoo rau 5v thiab qhov tsis zoo rau GND los pab ntawm qhov ntws. Tom qab ntawd, los ntawm txoj kab zoo, koj yuav tsum txuas lwm lub xov hlau thiab txuas nws mus rau txoj kab ABCDE ntawm lub khob cij. Ib sab tom ntej ntawm cov xov hlau txuas tshiab, koj yuav tsum tau siv lwm lub xov hlau los txuas qhov chaw tom ntej mus rau A0 ntawm Arduino board. Tom qab txuas A0, koj siv tus kws kho qhov muag mus rau ntawm lub khob cij, kom paub tseeb tias ob qho kawg ntawm cov kab hluav taws xob txuas nrog cov xov hlau zoo txuas thiab A0 xaim. Thaum koj tus photoresistor tau teeb tsa, koj yuav ntxiv cov resistor, uas yuav tsum tau ua kab nrog A0 xaim. Thaum ntawm qhov tod tes ntawm tus tiv thaiv, koj yuav tsum tau siv lwm lub xov hlau los txuas nws thiab txuas cov xov hlau mus rau txoj kab tsis zoo. Cov khoom tiav yuav tsum zoo li daim duab thib ob.

Kauj ruam 2: Txuas lub LED

Txuas lub LED
Txuas lub LED
Txuas lub LED
Txuas lub LED
Txuas lub LED
Txuas lub LED

Ua ntej, koj yuav tsum tau siv cov xov hlau txuas txuas D-pin, uas yog tus pin nyob rau sab saum toj ntawm Arduino board (Kuv siv D12) tom qab ntawd txuas nws mus rau ib feem ntawm Arduino board. Tom ntej no, siv cov xov txuas txuas ntxiv rau LED (yuav tsum zoo li daim kab xev liab) kab ib qho ntawm qhov xaus nrog D-pin, thaum txuas rau lwm qhov kawg ntawm txhua qhov chaw ntawm lub khob cij. Hauv qab ntawm ib qho kawg, qhov kawg uas tsis muaj kab nrog D-pin yuav tsum siv tus tiv thaiv. Ntawm qhov kawg ntawm tus tiv thaiv, siv xaim txuas nws mus rau txoj kab tsis zoo (yuav tsum tau kab). Cov khoom tiav yuav tsum zoo li daim duab saum toj no.

Kauj Ruam 3: Teeb Tus Hais Lus

Teeb Tus Hais Lus
Teeb Tus Hais Lus
Teeb Tus Hais Lus
Teeb Tus Hais Lus

Vim tias cov xov hlau txuas nrog tus neeg hais lus tsis tuaj yeem txuas ncaj qha rau lub rooj tsavxwm, yog li peb yuav xav tau txuas cov xov hlau. Qhov liab txuas nrog tus hais lus yog qhov zoo, yog li ntawd, peb yuav tsum txuas nws mus rau D-pin. Cov xaim dub yog qhov tsis zoo, yog li ntawd, peb yuav tsum txuas nws mus rau GND.

Kauj ruam 4: Coding

Lub vev xaib rau kuv tus lej:

Thaum xub thawj, tus hais lus tus pin yog D-pin rau tus hais lus. Tom qab ntawd qhov ntev yog tus naj npawb ntawm cov ntawv, cov ntawv sau cim yog cov ntawv sau nkauj zoo siab hnub yug yuav ua si. Qhov ntaus yog cov ntawv hauv tus lej thiab lub sijhawm yog qhov ntev ntawm daim ntawv. Hauv zaj nkauj hnub yug zoo siab, muaj 8 qhov sau tseg txhua qhov, pib los ntawm ib qho, sau ntawv yuav yog ib ob, tom qab ntawv tus lej yuav txav mus rau cim ob, yog li thiab lwm yam. Tom qab ntawv ib feem ntawm txoj cai yog rau Photoresistor los tswj cov neeg hais lus. Ntxiv mus, ib feem uas nws hais tias void play note yog qhov zoo ib yam, nws ua cov ntawv sau ua ntu zus. Raws li tau hais los saum no, muaj 8 qhov sau tseg hauv zaj nkauj no, thiab cov cai yuav qhia rau tus neeg hais lus kom pib los ntawm ib qho. Tom qab ntawv ntu tom ntej uas nws hais tias teeb tsa tus lej digital ua qhov tso tawm, nws yog lub teeb ci LED. Lub voj void yog Photoresistor tus lej. Yog li thaum lub teeb nthwv dej me dua 500, Photoresistor yuav tsis qhuas LED thiab tus hais lus kom ua haujlwm, tab sis yog tias nws dhau qhov nyiaj, ces LED yuav ci, thiab tus hais lus yuav pib ua nkauj.

Kauj ruam 5: Kho kom zoo nkauj

Kho kom zoo nkauj
Kho kom zoo nkauj
Kho kom zoo nkauj
Kho kom zoo nkauj
Kho kom zoo nkauj
Kho kom zoo nkauj
Kho kom zoo nkauj
Kho kom zoo nkauj

Kev kho kom zoo nkauj txawv ntawm ib tus neeg mus rau lwm tus. Kuv tus kheej, txaus siab rau daim npav khoom siv tes, yog li kuv tau ua ib qho. Tus yuam sij los ua daim npav yog ib qho yooj yim, txhua yam koj xav tau yog xaum xim, xaum xaum, qee daim kab xev, thiab ntawv A4. Koj tuaj yeem pom cov ncuav mog qab zib hnub yug uas koj nyiam, thiab taug qab lossis kos rau hauv ib nrab ntawm ib sab ntawm daim ntawv. Tom qab kos nws, koj tuaj yeem ntxiv qee qhov kev piav qhia ntawm sab. Tom qab ua kom zoo nkauj sab saud ntawm daim ntawv, quav nws hauv ib nrab. Tom qab txiav nws ib nrab, xam tawm qhov twg koj xav kom koj LED thiab Photoresistor thiab txiav 2 qhov, ib qho rau txhua qhov chaw (txiav lub qhov me, tab sis loj txaus kom haum Photoresistor thiab LED). Siv daim kab xev kom ruaj ntseg LED thiab Photoresistor. Tom qab ntawd ib nrab hauv qab yog rau koj los sau koj cov lus hnub yug zoo siab. Daim npav ua tiav tau qhia hauv cov duab saum toj no. Hmoov zoo!

Pom zoo: