Cov txheej txheem:

Tsab ntawv tsa suab Sensing Arduino Laser: 5 Kauj Ruam
Tsab ntawv tsa suab Sensing Arduino Laser: 5 Kauj Ruam

Video: Tsab ntawv tsa suab Sensing Arduino Laser: 5 Kauj Ruam

Video: Tsab ntawv tsa suab Sensing Arduino Laser: 5 Kauj Ruam
Video: Qhia Xeem Ntawv Tsav Tsheb ບົດສອບເສັງໃບຂັບຂີ່ ພາກທິດສະດີ 2024, Kaum ib hlis
Anonim
Tsab ntawv tsa suab Sensing Arduino Laser
Tsab ntawv tsa suab Sensing Arduino Laser
Tsab ntawv tsa suab Sensing Arduino Laser
Tsab ntawv tsa suab Sensing Arduino Laser

NCO TSEG: Txoj haujlwm no tau tsim los hauv txoj hauv kev uas txhua qhov tuaj yeem rov qab siv tau rau yav tom ntej. Raws li qhov tshwm sim, cov khoom kawg tsis ruaj khov dua li nws yuav yog koj yuav tsum siv cov ntaub ntawv ruaj khov ntxiv xws li kua nplaum, siv tshuaj txhuam, thiab lwm yam …

Lus Ceeb Toom: Tsis txhob tso lub laser ntawm qhov siab vim nws tuaj yeem ua rau puas ntsoog

Khoom siv

  • Arduino (Mega 2560) Cov.
  • Cov qhob cij
  • Tsab ntawv tsa suab Sensor (HC-SR501)
  • Laser Qauv (ST1172)
  • Servo Tsav (SG90)
  • Txiv neej rau poj niam cov xov hlau
  • Txiv neej rau txiv neej cov xov hlau
  • Ntawv phuam yob
  • Kab xev kab xev
  • Zip kev sib txuas
  • Hauv paus
  • Txiab

Kauj Ruam 1: Ruaj Ntseg Cov Khoom rau Lub Hauv Paus

Ruaj ntseg cov khoom rau hauv paus
Ruaj ntseg cov khoom rau hauv paus
Ruaj ntseg cov khoom rau hauv paus
Ruaj ntseg cov khoom rau hauv paus

Txuas ib daim kab xev rau hauv qab ntawm Arduino pawg thawj coj thiab, yog tias tsim nyog, lub rooj mov ci.

Muab daim kab xev rau peb sab ntawm lub cav servo tsis muaj xov hlau.

Txuas Arduino board, qhob cij board, thiab servo motor rau lub hauv paus.

Txhawm rau ntxiv kev ruaj ntseg koj tuaj yeem kaw kab lus Servo Motors.

Kauj Ruam 2: Cov Khoom Siv Hlau

Hlau Cheebtsam
Hlau Cheebtsam
Hlau Cheebtsam
Hlau Cheebtsam
Hlau Cheebtsam
Hlau Cheebtsam

Rau kab kos thiab pom kev pom cov duab saum toj no. Rau cov tswv yim thiab tso tawm xov tooj tus pin tseeb koj siv tsis muaj teeb meem; txawm li cas los xij, yog tias koj xav siv peb tus lej yam tsis tau hloov pauv, koj yuav tsum siv tus pin uas peb hais qhia. Rau hauv av (tsis zoo) thiab zoo ib tus pin ntawm lub rooj mov khob cij, tsuav yog lawv nyob hauv kab uas Arduino av thiab lub zog txuas rau. Cov xim tshwj xeeb hauv qab no phim cov xim ntawm cov xov hlau peb siv hauv peb cov duab.

  1. Txuas lub xov tooj cua mus rau arduino

    • Txiv kab ntxwv - 5v ntawm Arduino kom zoo rau ntawm daim ntawv qhia zaub mov
    • Dub - GND (hauv av) ntawm Arduino rau qhov tsis zoo ntawm lub khob cij
  2. Tsab ntawv tsa suab Sensor

    • Xim av - av (tsis zoo) ntawm lub rooj mov ci
    • Txiv kab ntxwv - Zoo rau ntawm lub khob cij
    • Liab - Tawm tswv yim/Tso Tawm 14 ntawm Arduino
  3. Servo Tsav

    • Liab - Zoo ntawm lub rooj mov ci
    • Xim av - av (tsis zoo) ntawm lub rooj mov ci
    • Txiv kab ntxwv - Cov tswv yim/Tso tawm 4 ntawm Arduino
  4. Laser

    • Xiav - Hauv av (tsis zoo) ntawm lub khob cij
    • Daj - Tawm tswv yim/Tso Tawm 10 ntawm Arduino
    • Ntsuab - Zoo ntawm lub rooj mov ci

Nco tseg: Thaum xaim lub ntsuas hluav taws xob thiab lub laser nco ntsoov siv cov xov hlau ntev dua, txwv tsis pub cov xov hlau yuav raug rub tawm ntawm qhov chaw vim lub turret tig los ntawm ib sab mus rau ib sab.

Kauj Ruam 3: Txuas Cannon rau Tsav

Txuas Cannon rau Tsav
Txuas Cannon rau Tsav
Txuas Cannon rau Tsav
Txuas Cannon rau Tsav
Txuas Cannon rau Tsav
Txuas Cannon rau Tsav
Txuas Cannon rau Tsav
Txuas Cannon rau Tsav

Poke ob txheej ntawm qhov sib luag rau hauv daim ntawv phuam lub luag haujlwm ntawm ib kawg.

Xov ob zip txuas los ntawm lub qhov, ib tus zip khi los ntawm txhua txheej ntawm qhov.

Muab daim ntawv phuam yob sib dhos rau saum lub servo lub cev thiab ua kom nruj zauv ib ncig ntawm tus ntoo khaub lig ntawm lub cav.

Vim yog qhov hnyav tsis sib xws, daim ntawv phuam yob yuav qaij rau pem hauv ntej thiab taw tes rau. Txhawm rau kho qhov no peb tso cov zauv sib txuas ntxiv ntawm lub cav thiab ntawv phuam yob rau kev ruaj ntseg ntxiv.

Kauj Ruam 4: Txuas Motion Sensor thiab Laser Module rau Turret

Txuas Motion Sensor thiab Laser Module rau Turret
Txuas Motion Sensor thiab Laser Module rau Turret
Txuas Motion Sensor thiab Laser Module rau Turret
Txuas Motion Sensor thiab Laser Module rau Turret
Txuas Motion Sensor thiab Laser Module rau Turret
Txuas Motion Sensor thiab Laser Module rau Turret

Txuas lub suab txav mus rau qhov kawg ntawm daim ntawv phuam yob raws li qhia hauv cov duab saum toj no. Ruaj nws kom ruaj khov kom zoo li lub turret tig nws tsis txav mus.

Ruaj ntseg laser mus rau saum daim phuam yob raws li qhia hauv daim duab saum toj no.

Kauj ruam 5: Arduino Code

Arduino Txoj Cai
Arduino Txoj Cai

Hauv qab no yog qhov txuas rau github chaw cia khoom uas muaj cov lej arduino rau txoj haujlwm no. Yog tias muaj qhov sib txawv ntawm cov tswv yim/cov zis tau siv tus lej yuav xav tau hloov kho kom pom qhov no. Ib qho ntxiv koj yuav tsum rub tawm txhua lub tsev qiv ntawv cuam tshuam uas tau hais hauv txoj cai.

github.com/ArduinoToys/ArduinoMotionSensin…

Nco tseg: Yog tias koj xav tau kev pab teeb tsa koj li arduino mus rau

Pom zoo: