Cov txheej txheem:

Kev hloov kho Ottobot: 5 Kauj Ruam
Kev hloov kho Ottobot: 5 Kauj Ruam

Video: Kev hloov kho Ottobot: 5 Kauj Ruam

Video: Kev hloov kho Ottobot: 5 Kauj Ruam
Video: Cas Tsis Xaiv Koj - R-Lin Thoj New Song Original By Zaj Dub [Official MV] 2023 2024, Hlis ntuj nqeg
Anonim
Kev Hloov Kho Ottobot
Kev Hloov Kho Ottobot
Kev Hloov Kho Ottobot
Kev Hloov Kho Ottobot

Nov yog qhov pib-qib neeg hlau tsim tsim qhov haujlwm uas kuv hloov kho Ottobot los ntawm kev ntxiv cov ntsuas tshiab rau nws cov qauv. Otto yog neeg hlau sib tham sib yooj yim raws Arduino cov lus programming. Yeej, cov lus qhia ua haujlwm no yog hais txog kev cia neeg hlau teb rau ntau lub ntsuas pa hauv ntau txoj hauv kev kom nws ua tej yam raws li qhov ntsuas tau txhawb siab. Cov khoom kawg yuav tsum yog, thaum lub pob nyem, lub ottobot ua suab paj nruag luv lossis flaps nws txhais taw lossis tig rau lub teeb-emitting diode.

Kauj Ruam 1: Cov Khoom Sib Dhos thiab Kev Txhim Kho Software

Cov khoom siv hluav taws xob hauv qab no thiab kev siv computer yog xav tau:

  • Otto DIY neeg hlau
  • Qhib-qhov IDE rau Arduino (kuv yog version 1.8.5 ntawm Macbook Pro)
  • 1 khob cij
  • 8 jumper xov hlau (txiv neej rau poj niam)
  • 3 jumper xov hlau (poj niam rau poj niam)
  • 2 LEDs ntawm ib qho xim
  • 2 cov nyees khawm
  • 1 HW-483 kov sensor

Kauj Ruam 2: Kev Tso Npe ntawm Pushbuttons

Qhov chaw ntawm Pushbuttons
Qhov chaw ntawm Pushbuttons
Qhov chaw ntawm Pushbuttons
Qhov chaw ntawm Pushbuttons

Muab lub laub khawm rau hauv lub khob cij, hla tus hav rau Dual hauv-Kab Pob (DIP) ICs. Tag nrho plaub ceg ntawm lub pob yuav tsum tau kho kom nruj kom lub zog hluav taws xob tuaj yeem ntws mus tsis tau nrawm raws cov kab dav dav ntawm lub khob cij. Ib yam li ntawd, tso lwm lub laub khawm ntawm lwm qhov chaw.

Txuas ib txhais ceg ntawm lub pob los ntawm jumper xaim (txiv neej rau poj niam) mus rau qhov hluav taws xob (V lossis +) tus pin ntawm analog 0 (A0) ntawm koj daim thaiv Arduino Nano IO. Kuj xaim tus ceg mus rau lub teeb liab (S) tus pin ntawm A0. Ntawm qhov rov qab sib txuas txuas lub qhov nyob hauv tib kab lus raws li txhais ceg rau hauv av pin (G lossis GND) ntawm A0. Rov ua cov kauj ruam rau khawm thib ob tshwj tsis yog siv A1 lub sijhawm no.

Kauj Ruam 3: Teeb LED ntau

Ntau Teeb Teeb
Ntau Teeb Teeb
Ntau Teeb Teeb
Ntau Teeb Teeb

Plug LED 1 mus rau lub khob cij, ob txhais ceg faus rau hauv ob daim kab xev sib cais. Muab cov ceg ntev ntawm LED 2 nyob ib sab rau luv ceg ntawm LED 1 hauv tib lub dav hlau dav hlau. Cov ceg luv ntawm LED 2 tuaj yeem mus rau txhua qhov chaw tsuav nws tsis nyob hauv kab ntawv siv ntawm lub rooj tsavxwm. Thaum kawg, kom ua tiav cov kab hluav taws xob sib txuas, Kuv txuas tus ceg ntev ntawm LED 1 rau lub teeb liab (S) tus pin ntawm A4 thiab luv luv ntawm LED 2 mus rau tus pin G ntawm A4.

Tam sim no txuas ntxiv hauv lub voj raws li ib txoj hauv kev los ntawm kev pib-rau-ua tiav, nrog Anode (qhov zoo) ntawm LED 2 koom nrog Cathode (tsis zoo) ntawm LED 1. Ntxiv mus, qhov hluav taws xob tso tawm los ntawm tus pin analog txuas rau qhov zoo txhais ceg ntev ntawm LED 1, thiab los ntawm LED qhov txuas txuas ntxiv yog tsim los ntawm qhov tsis zoo mus rau qhov zoo ntawm LED 2 hauv DC Circuit, los ntawm qhov hluav taws xob mus los ntawm qhov tsis zoo xaus rau hauv av pin.

Kauj Ruam 4: Kov Sensor Kev Sib Txuas

Kov Sensor Kev Sib Txuas
Kov Sensor Kev Sib Txuas

Peb txhais ceg ntawm qhov kov lub ntsej muag muaj cov haujlwm sib txawv. Ib qho nruab nrab lees txais qhov hluav taws xob. Ib qho ntawm ib sab nrog cov ntawv loj S sau ib sab ntawm nws yog lub luag haujlwm rau cov lus qhia tawm, thiab lwm qhov cim los ntawm lub cim rho tawm yog lub tshuab hluav taws xob hauv av. Yog li ntawd, txuas sab pins rau S thiab G ntawm digital 7 (D7), nruab nrab txhais ceg rau V.

Kauj ruam 5: Program Upload

Rub tawm qhov program
Rub tawm qhov program

Kuv txuas ib daim ntawv.ino ntawm kuv tus lej ottobot rau cov kauj ruam no rau koj siv. Kuv lees paub qhov tsis raug hauv kuv qhov haujlwm, tshwj xeeb yog ntu LED. Kuv tsuas yog tswj kom tso lub teeb ntsais ib txhij txawm tias kuv mob siab rau ua kom lawv ploj mus thiab tawm. Kuv thov txim rau qhov tsis meej pem hauv kuv kev sib txuas lus thiab, vam tias, cov neeg nyeem kuv cov ntawv tuaj yeem ua raws cov txheej txheem saum toj no tau yooj yim.

Pom zoo: