Cov txheej txheem:

Arduino Light Detection Tutorial: 3 Kauj Ruam (nrog Duab)
Arduino Light Detection Tutorial: 3 Kauj Ruam (nrog Duab)

Video: Arduino Light Detection Tutorial: 3 Kauj Ruam (nrog Duab)

Video: Arduino Light Detection Tutorial: 3 Kauj Ruam (nrog Duab)
Video: Amazing arduino project 2024, Kaum ib hlis
Anonim
Arduino Light Detection Tutorial
Arduino Light Detection Tutorial

Tom qab ua tiav qhov kev qhia no, koj yuav kawm paub yuav ua li cas koj tuaj yeem txheeb xyuas kev hloov pauv ntawm cov teeb pom kev nyob ib puag ncig koj. Cov ntu rau txoj haujlwm no tau muab los ntawm Kuman. Koj tuaj yeem pom lawv hauv lawv Arduino UNO Starter Kit.

Kauj Ruam 1: Qhov Yuav Tsum Tau

Qhov Yuav Tsum Tau
Qhov Yuav Tsum Tau
  • Arduino Board (Kuv siv UNO)
  • Cov qhob cij
  • LDR
  • LED (Xim tsis muaj teeb meem)
  • 10k ohm Resistor (Kuj)
  • 220 ohm Resistor (yeem)
  • 5 Jumper Xov

Koj yuav tuaj yeem yuav cov khoom uas kuv tau siv ntawm allchips.ai

Lawv lub khw yuav nce txog thaum lub Ib Hlis xaus. Nyob twj ywm

Kauj Ruam 2: Ua Qhov Tsim Nyog Kev Sib Txuas

Ua Qhov Tsim Nyog Kev Sib Txuas
Ua Qhov Tsim Nyog Kev Sib Txuas
Ua Qhov Tsim Nyog Kev Sib Txuas
Ua Qhov Tsim Nyog Kev Sib Txuas

Pib nrog txuas LED. Cov hlau lead luv ntawm LED (cathode, -) txuas rau hauv av ntawm Arduino (GND). Qhov ntev kawg (anode, +) txuas rau ib kawg ntawm 220 ohm resistor, nrog rau lwm qhov kawg mus rau Digital Pin 13 ntawm Arduino. Tam sim no LED tau txuas nrog.

Tam sim no peb txuas ntxiv nrog LDR. Ib ntawm nws qhov xaus txuas rau 5V thiab lwm qhov - rau GND siv 10k resistor. Thaum kawg, txuas tib kab (uas mus rau hauv av) rau Analog Pin A0 ntawm Arduino. Ua qhov kev sib txuas no tom qab tus tiv thaiv! Koj tuaj yeem siv daim duab thib ob saum toj no rau kev siv

Kauj Ruam 3: Tshaj Tawm Txoj Cai thiab Ua tiav

Txuas Arduino pawg thawj coj saib mus rau koj lub PC thiab xa cov lej no. Koj tuaj yeem hloov kho nws kom haum rau koj xav tau. Piv txwv li, koj tuaj yeem hloov tus nqi uas lub teeb ci LED lossis tus pin raws li kev sib txuas uas koj tau ua. Nov yog cov vis dis aus yooj yooj yim, qhia txog qhov haujlwm ua:

Pom zoo: