Cov txheej txheem:

Arduino Tsis Siv Neeg Hmo Teeb: 5 Kauj Ruam
Arduino Tsis Siv Neeg Hmo Teeb: 5 Kauj Ruam

Video: Arduino Tsis Siv Neeg Hmo Teeb: 5 Kauj Ruam

Video: Arduino Tsis Siv Neeg Hmo Teeb: 5 Kauj Ruam
Video: Qhia txuas xaim hluav taws xob daim: 02 2024, Hlis ntuj nqeg
Anonim
Arduino Tsis Siv Neeg Hmo Teeb
Arduino Tsis Siv Neeg Hmo Teeb
Arduino Tsis Siv Neeg Hmo Teeb
Arduino Tsis Siv Neeg Hmo Teeb

Koj puas tau nyob ib leeg kho siab thiab ntshai thaum koj tseem yog menyuam yaus, txog 5 lossis 6 xyoos, thiab koj yuav tsum tau pw ib leeg? Ntawm qhov tod tes, koj tub nkeeg heev tsis nco qab tig lub menyuam yaj hmo ntuj txhua lub sijhawm koj chav tsaus ntuj. Tsis tas li, txiav txim siab qhov teeb meem ntawm kev ua kom sov hauv ntiaj teb, nws yuav tsis yog lub tswv yim zoo kom ib txwm tig lub teeb. Lub teeb hmo ntuj tsis siv neeg tuaj yeem daws qhov teeb meem thiab txiav txim siab koj tab tom tawm tsam nrog; txiav txim siab qhov pom kev ntawm ib puag ncig thiab tig rov los thaum koj raug kev txom nyem los ntawm kev kho siab nyob hauv qhov tsaus ntuj. Yog tias nws twb tau sawv ntxov tag kis lawm, tseem koj tseem pw tsaug zog, nws yuav yog lub luag haujlwm zoo rau lub teeb ntawm kev kaw cia kom txuag hluav taws xob. Lub teeb xiav ua rau tib neeg muaj huab cua nyob ntsiag to thiab so kom txaus, tiv thaiv koj ntawm qhov tsaus ntuj thaum muab hmo ntuj zoo rau koj.

Kauj Ruam 1: Npaj Cov Khoom

Cov ntaub ntawv xav tau rau Circuit

  • Arduino Uno x 1
  • Lub khob cij x1
  • Jumper Hlau x1
  • Resistors 10k Ohm x1
  • Resistors 100 Ohm x1
  • LED teeb (xiav) x1
  • LDR sensor x1

Lwm cov ntaub ntawv

  • Lub thawv ntawv raws li lub hauv paus ntawm koj lub teeb
  • Ciab
  • Cov Khoom Siv Hluav Taws Xob

Kauj ruam 2: Code

Code
Code
Code
Code

Cov cai nyob ntawm no.

Thawj daim duab yog teeb tsa Serial print. Tom qab ntawd daim duab thib ob yog hais txog lub program tseem ceeb uas peb muaj rau cov khoom lag luam.

Kauj ruam 3: Pib Sib Sau

Pib Sib Sau!
Pib Sib Sau!
Pib Sib Sau!
Pib Sib Sau!
Pib Sib Sau!
Pib Sib Sau!
Pib Sib Sau!
Pib Sib Sau!

Ua raws li daim duab Circuit saum toj no lossis ua raws cov lus qhia hauv qab no:

Sensor:

  1. Txuas 5v mus rau kab zoo them (+)
  2. Txuas GND rau kab tsis raug them (-)
  3. Sib sau ua ke ib feem ntawm LDR sensor, uas tsis muaj teeb meem twg ceg koj txuas nrog lawv (nco ntsoov siv tus tiv thaiv ntawm 100 Ohm)

LED teeb:

  1. DPin 8 raws li qhov zoo thiab txuas nrog cov ceg ntev ntawm LED teeb
  2. Txuas cov kab tsis raug them mus rau tus tiv thaiv ntawm 10k Ohm
  3. Ntxiv lwm txoj hlua los txuas nrog cov ceg luv ntawm LED teeb

Kauj Ruam 4: Zoo Li Cas

Tshwm sim
Tshwm sim
Tshwm sim
Tshwm sim

Raws li cov khoom lag luam, cov tsos yuav tsum muaj tswv yim thiab tshwj xeeb ib yam nkaus. Yog li ntawd, kuv txiav txim siab siv quav ciab los ua lub pob zoo li lub teeb npog, uas yog hollowed sab hauv thiab nrog cov nplaim matte. Tom qab ua tiav lub pob zoo li lub npog rau lub teeb, nws yog lub sijhawm qhib qhov chaw, lossis lub qhov av, rau lub teeb thiab LDR sensor kom muab tso rau sab hauv npog. Los ntawm kev siv cov cuab yeej siv, peb tuaj yeem ua tiav qhib lub qhov nyob hauv qab ntawm pob.

Kauj ruam 5: Nrog koj zoo siab

Nrog koj zoo siab !!! Txhua txoj haujlwm tau ua tiav, koj tau txais lub teeb hmo ntuj tshiab thiab koj tuaj yeem hloov lub teeb nrog cov xim sib txawv los ntawm kev ua lub teeb ntawm koj tus kheej.

Pom zoo: