Cov txheej txheem:

Txoj Haujlwm Engineering: 3 Kauj Ruam
Txoj Haujlwm Engineering: 3 Kauj Ruam

Video: Txoj Haujlwm Engineering: 3 Kauj Ruam

Video: Txoj Haujlwm Engineering: 3 Kauj Ruam
Video: Lub Zog Nruab Nrog (Hmong Dubbed) 2024, Cuaj hlis
Anonim
Txoj Haujlwm Engineering
Txoj Haujlwm Engineering

Nov yog lub voj voos uas ua haujlwm los ntawm kev muaj 2 lub teeb ci, ib qho ci thiab ib qho ploj, uas tig los nyob ntawm qhov pom qhov pom sab nraud xws li lub hnub. Lub hom phiaj ntawm kev siv hluav taws xob no yog txuag hluav taws xob thaum nruab hnub los ntawm kev qhib lub teeb pom kev tab sis tseem muaj lub teeb ci rau thaum nws tsaus ntuj.

Khoom siv

Cov ntaub ntawv xav tau yog:

1. LEDs (2)

2. Resistors (3) (260 Ohm, 470 Ohm thiab 1200 Ohm)

3. Photoresistor (1)

4. Cov qhob cij

5. Arduino

6. Cov xov hlau

Kauj ruam 1: Photoresistor

Photoresistor
Photoresistor

Thawj kauj ruam hauv kev thaiv kab hluav taws xob no yog teeb tsa cov duab tiv thaiv.

Pib los ntawm kev txuas 5V los ntawm Arduino mus rau txoj kev tsheb nqaj hlau ntawm lub khob cij. Kuj txuas hauv av los ntawm Arduino mus rau txoj kev tsheb nqaj hlau.

Tom qab ntawd, muab tus photoresistor tso rau ntawm lub khob cij thiab txuas thawj lub dav hlau mus rau txoj kev tsheb nqaj hlau. Tom qab ntawd txuas lub davhlau ya nyob twg thib ob rau tus tiv thaiv uas coj mus rau txoj kev tsheb nqaj hlau thiab txuas rau xaim txuas mus rau ib qho ntawm Arduino cov tswv yim (qhov no, kuv xaiv A0).

Kauj ruam 2: LED

LED cov
LED cov

Cov kauj ruam thib ob yog teeb tsa cov LED.

Qhov no yog ua tiav los ntawm kev txuas cov cathode rau cov tsheb nqaj hlau hauv av. Tom qab ntawd txuas lub resistor (260 Ohms) mus rau anode nrog rau cov zis los ntawm Arduino (9).

Rov ua cov txheej txheem no rau LED thib ob tab sis hloov pauv tus tiv thaiv rau 1200 Ohms thiab Arduino tso tawm rau 5.

Kauj ruam 3: Coding

Coding
Coding

Kauj ruam kawg yog ntxiv cov coding.

Pib nrog txhais cov pins uas txuas rau photoresistor thiab LED's nrog rau kev txheeb xyuas tus nqi ntawm lub teeb pom kev los ntawm photoresistor. Tom qab ntawd, hauv ntu teeb tsa txheeb xyuas dab tsi yog kev tawm tswv yim thiab dab tsi yog qhov tso tawm. Tom qab ntawd, tsim ib qho yog/lwm nqe lus uas yog lub teeb qis dua tom qab ntawd qhib lub teeb ci ci, lwm tus tig rau lub teeb ci LED.

Nrog koj zoo siab, txoj haujlwm tiav lawm.

Pom zoo: