Cov txheej txheem:

EBot8 Lub Hom Phiaj Tom Qab Neeg Hlau: 5 Kauj Ruam (nrog Duab)
EBot8 Lub Hom Phiaj Tom Qab Neeg Hlau: 5 Kauj Ruam (nrog Duab)

Video: EBot8 Lub Hom Phiaj Tom Qab Neeg Hlau: 5 Kauj Ruam (nrog Duab)

Video: EBot8 Lub Hom Phiaj Tom Qab Neeg Hlau: 5 Kauj Ruam (nrog Duab)
Video: Lis Yaj Pov : Lub Hom Phiaj 2024, Hlis ntuj nqeg
Anonim
EBot8 Lub Hom Phiaj Tom Qab Neeg Hlau
EBot8 Lub Hom Phiaj Tom Qab Neeg Hlau
EBot8 Lub Hom Phiaj Tom Qab Neeg Hlau
EBot8 Lub Hom Phiaj Tom Qab Neeg Hlau

Koj puas tau xav tsis thoob los ua tus neeg hlau uas ua raws txhua qhov chaw koj mus? Tab sis cia li ua tsis tau?

Zoo … Tam sim no koj tuaj yeem! Peb nthuav qhia koj cov khoom hauv qab no neeg hlau! Mus rau qhov kev qhia no, nyiam thiab pov npav thiab tej zaum koj tuaj yeem ua tau ib yam nkaus !!

Kauj Ruam 1: Sau cov Khoom

Sau Cov Khoom
Sau Cov Khoom
Sau Cov Khoom
Sau Cov Khoom
Sau Cov Khoom
Sau Cov Khoom

Txhawm rau ua qhov haujlwm yooj yim zoo kawg no. Peb xav tau cov hauv qab no los ua:

Pawg Ebot8

Programming kab

Poj niam rau txiv neej Jumper cables

Ultrasonic Sensors

Chassis {w/ chassis}

2 DC Tsav

Txhua yam ntaub ntawv no tuaj yeem pom ntawm no.

Kauj ruam 2: Kev thaiv kab

Tom qab koj tau khaws cov ntaub ntawv los ntawm no. Tam sim no txuas lub Ultrasonic Sensors rau EBot Board {A0-A1} xim coded kom raug. Yog tias koj tau ua li ntawd, Cia wb mus nrog codin '.

Kauj ruam 3: Debugging

Debugging
Debugging

Tam sim no kom ntseeg tau tias peb lub Infrared sensors ua haujlwm tau zoo peb yuav tsum tau debug nws uas txhais tau tias txheeb xyuas thiab tshem tawm qhov ua yuam kev los ntawm (khoos phis tawj khoos phis tawj lossis software).

  1. Qhib koj li EBot Blockly app ntawm koj lub computer.
  2. Xaiv Kev Nyeem Ntawv Nyeem/Debug.
  3. Xaiv los ntawm daim ntawv teev npe- 'Infrared Sensor'.
  4. Xaiv tus pin uas koj thawj Infrared Sensor haum rau. (PS koj tuaj yeem tshawb xyuas ib qho sensor ib zaug xwb.)
  5. Nyem 'Debug'.
  6. Ua tib yam rau lub sensor thib ob.
  7. Tom qab rub tawm tiav thiab qhia qhov muaj txiaj ntsig los ntawm ob qho tib si, peb tuaj yeem txuas ntxiv nrog coding.

(Nco tseg: Yog tias kev debugging tau ntsib nrog qhov ua yuam kev, sim dua, txheeb xyuas qhov txuas. Yog tias tsis yog, tom qab ntawd hloov lub sensor thiab sim dua.)

Kauj ruam 4: Coding

Coding
Coding

Tam sim no koj tuaj yeem yooj yim mus tom ntej thiab theej peb cov cai los ntawm no lossis luam theej tawm cov cai. Txawm hais tias peb pom zoo cov txheej txheem blockly raws li qhia n daim duab raws li nws yooj yim to taub

// Code_for_object_following_robot

#define ultrasound (x) ({analogRead (x)*0.833}/4) #include "Ebot.h" void setup {} {// Initialisations ebot_setup {}; // Tus Qauv PinMode {A0, INPUT}; pinMode {A1, INPUT}; } void loop {} {yog (ultrasound (A0)> = 30 && ultrasound (A0) = 30 && ultrasound (A1) <= 200) {LMotor_1 (0); RMotor_1 (0); } lwm {LMotor_1 (-5); RMotor_1 (10); }

Kauj ruam 5: Demo

Image
Image

Koj puas nyiam nws? Yog, kuv paub. Peb yuav txuas ntxiv ua ntau qhov kev sib tham & kev lom zem rau koj xwb!

Xav tias dawb los tawm tswv yim hauv cov lus pom thiab peb yuav teb tiag.

Pom zoo: