Cov txheej txheem:

Hmo Ntuj Kev Nyuaj Siab Tswb Siv Arduino: 6 Kauj Ruam
Hmo Ntuj Kev Nyuaj Siab Tswb Siv Arduino: 6 Kauj Ruam

Video: Hmo Ntuj Kev Nyuaj Siab Tswb Siv Arduino: 6 Kauj Ruam

Video: Hmo Ntuj Kev Nyuaj Siab Tswb Siv Arduino: 6 Kauj Ruam
Video: $600 NYIAJ PAB CA * $3600 CHILD TAX * BIDEN SPEECH * INDIA KAB MOB HNYAV * TOP NEWS+ 04/29/2021 2024, Kaum ib hlis
Anonim
Hmo Ntuj Kev Nyuaj Siab Tswb Siv Arduino
Hmo Ntuj Kev Nyuaj Siab Tswb Siv Arduino

Nyob zoo, txhua yam nws yog qhov qhia kuv thib 5. Feem ntau kuv sau qhia thaum muaj qee qhov kev sib tw uas kuv tuaj yeem siv Arduino ua kuv li kev tivthaiv. Yog li nrog qhov kev sib tw Optical no, kuv tau muaj sijhawm los nthuav tawm txoj haujlwm hauv tsev kawm yooj yim nrog tsawg heev thiab cov khoom siv yooj yim tseem yog qhov haujlwm txaus.

Tam sim no cia peb tsim Hmo Hmo Ntes Siv Arduino.

Kauj Ruam 1: Cov Khoom Qhia

  1. Arduino mini tso
  2. LDR ib thooj
  3. Leaser
  4. AA roj teeb (2)
  5. AA roj teeb tuav
  6. Hloov swb (2)
  7. Tsom iav (tsis xav txog qhov koj xav tau)
  8. Ib lub thawv me me ntawm 6cm X 5cm
  9. Ib tug coj
  10. Ib lub suab nrov
  11. 5v Fais Fab Khoom
  12. Earbud 5 daim
  13. Tsheb kauj vab hais 2 daim
  14. Super kua nplaum

Kauj Ruam 2: Daim iav tuav rau Kev Xav

Daim iav tuav rau kev xav
Daim iav tuav rau kev xav
Daim iav tuav rau kev xav
Daim iav tuav rau kev xav
Daim iav tuav rau kev xav
Daim iav tuav rau kev xav
  1. Los ntawm kuv lub khw muag khoom, Kuv tau txais daim iav nrog qhov ntev 2cm X 2cm
  2. Yog li kuv tau luam tawm txuas nrog 3d tshuab luam ntawv rau nws, koj tuaj yeem ua nws siv cov khov nab kuab.
  3. Siv cov kua nplaum super kuv lo daim me me ntawm pob ntseg pob ntseg ntawm daim iav.
  4. Nrog lub tsheb kauj vab hais lus, Kuv ua rau lawv nyob twj ywm.

Kauj Ruam 3: Buzzer/Tswb Siv Arduino Mini

Buzzer/Tswb Siv Arduino Mini
Buzzer/Tswb Siv Arduino Mini
Buzzer/Tswb Siv Arduino Mini
Buzzer/Tswb Siv Arduino Mini
Buzzer/Tswb Siv Arduino Mini
Buzzer/Tswb Siv Arduino Mini

Lub kaw lus no ua haujlwm los ntawm kev paub txog kev siv lub teeb nyob hauv nws ib puag ncig. Lub sensor uas tuaj yeem siv los ntsuas lub teeb yog LDR. Nws pheej yig, thiab koj tuaj yeem yuav nws los ntawm ib lub khw hluav taws xob hauv nroog lossis online.

LDR muab qhov hluav taws xob sib piv thaum txuas rau VCC (5V), uas sib txawv hauv qhov loj hauv qhov sib piv ncaj qha rau lub teeb pom kev siv ntawm nws. Ntawd yog, qhov kev siv lub teeb ntau dua, qhov ntau dua qhov sib npaug ntawm LDR yuav yog. Txij li thaum LDR muab tawm qhov hluav taws xob sib piv, nws txuas nrog rau tus pin analog nkag ntawm Arduino. Arduino, nrog nws cov ADC built-in (analog-rau-digital converter), tom qab ntawd hloov cov analog voltage (los ntawm 0-5V) rau hauv tus lej digital hauv thaj tsam ntawm (0-1023). Thaum muaj lub teeb txaus hauv nws ib puag ncig lossis ntawm nws saum npoo, hloov pauv qhov tseem ceeb digital nyeem los ntawm LDR los ntawm Arduino yuav nyob ntawm thaj tsam ntawm 800-1023.

Tom qab txuas LDR rau koj Arduino, koj tuaj yeem tshawb xyuas qhov txiaj ntsig los ntawm LDR ntawm Arduino. Txhawm rau ua qhov no, txuas Arduino ntawm USB rau koj lub PC thiab qhib Arduino IDE lossis software. Tom ntej no, xa cov lej txuas rau koj Arduino.

Tom qab xa cov cai, nyem lub pob ntawm Arduino IDE hu ua "Serial monitor". Qhov no yuav qhib lub qhov rai tshiab, uas luam tawm qhov sib txawv ntawm qhov screen. tau ntawm tus saib xyuas.

===================================

int prevSensorValue = 0; nws yuav teeb tsa thawj zaug thaum koj qhib lub cuab yeej.yog thaum koj thaiv lub teeb yuav muaj qhov poob ntawm tus nqi sensor, txheeb xyuas nws hauv tus lej saib. Rau kuv, nws yog 200, yog li kuv teeb yog qhov sib txawv ntau dua 150 ntau dua li nws yuav teeb tus pin 13 tus nqi rau siab.

Nws yuav tig rau BJT hloov thiab lub tswb yuav qhib rau 2 feeb.

Thaum kawg tsim lub thawv ntawv siv lub tshuab luam ntawv 3d.

Kauj Ruam 4: Leaser Beam

Leaser Nqaj
Leaser Nqaj
Leaser Nqaj
Leaser Nqaj
  1. Kuv tau txais 3v leaser, nrog txoj kab uas hla ntawm 6mm.
  2. Kuv tsim tus tuav rau nws, koj tuaj yeem hla nws thiab lo nws ncaj qha yog xav tau.
  3. Siv lub roj teeb AA tuav, nrog 2 lub roj teeb ntxiv qhov kawg rau qhov xaim xaim zoo thiab qhov tsis zoo kawg.
  4. Thaum qhov kev sib txuas raug lawm koj yuav tau txais lub teeb ci laser.
  5. Muab qhov hloov pauv ntawm qhov kev sib txuas, kev hloov swb yuav ua haujlwm zoo.
  6. Muab nws tso rau ntawm phab ntsa, cheeb tsam twg koj xav kom ruaj ntseg siv daim kab xev ob npaug.

Kauj Ruam 5: Teeb Kev Xaiv Xaiv

Teeb tsa Kev Xaiv Xaiv
Teeb tsa Kev Xaiv Xaiv
Teeb tsa Kev Xaiv Xaiv
Teeb tsa Kev Xaiv Xaiv
Teeb tsa Kev Xaiv Xaiv
Teeb tsa Kev Xaiv Xaiv
  1. Tom qab muab tus leaser, xyuas seb qhov nqaj poob ntawm phab ntsa.
  2. Muab lub iav tsom iav tso rau ntawd thiab sim ua kom nws poob ntawm koj qhov chaw xav tau los ntawm kev qaij nws.
  3. Rov ua cov kauj ruam 2 nrog lwm cov iav, txog thaum koj npog tag nrho thaj chaw uas koj xav kom nyab xeeb.
  4. Ua qhov kawg nqaj kom poob rau ntawm LDR.

Kauj ruam 6: Demo

Thaum txhua yam ua ke nws yuav ua haujlwm txaus.

Pom zoo: