Cov txheej txheem:

Boe Bot Mus Los Ntawm Kev Tshawb Nrhiav: 4 Cov Kauj Ruam
Boe Bot Mus Los Ntawm Kev Tshawb Nrhiav: 4 Cov Kauj Ruam

Video: Boe Bot Mus Los Ntawm Kev Tshawb Nrhiav: 4 Cov Kauj Ruam

Video: Boe Bot Mus Los Ntawm Kev Tshawb Nrhiav: 4 Cov Kauj Ruam
Video: Boe Bot Demonstration 2024, Kaum ib hlis
Anonim
Boe Bot Navigates Los Ntawm Kev Tshawb Pom
Boe Bot Navigates Los Ntawm Kev Tshawb Pom

Cov lus qhia no yuav pab koj tsim cov pob tw rau boe bot thiab nws yuav muab cov lej rau koj uas yuav coj mus rau boe bot hla lub tshawb.

Kauj Ruam 1: Cov ntaub ntawv rau lub Bumpers

Cov ntaub ntawv rau Bumpers
Cov ntaub ntawv rau Bumpers

Nov yog cov npe ntawm cov ntaub ntawv koj yuav xav tau los ua lub bumpers:

-Daim npav

-Kab xev

-Cov xov hlau

-Aluminium ntawv ci

-Resistors

-Velcro ua

Kauj Ruam 2: Tsim Lub Pob Zeb Siv Cov Khoom

Tsim Lub Pob Zeb Siv Cov Khoom Siv
Tsim Lub Pob Zeb Siv Cov Khoom Siv

Dab tsi koj yuav xav ua thawj zaug yog siv daim ntawv duab los ua flaps thiab kua nplaum daim duab los ua ke ua ib pawg. Tam sim no, daim kab xev ntawm txhuas ntawm cov flaps ua los ntawm cov duab los qhia. Yuav muaj plaub daim ntawm txhuas cov ntawv ci uas yuav muab kaw rau sab hauv ntawm txhua sab. Tam sim no txuas cov flaps rau ntawm cov ntawv los xij siv cov kua nplaum. Tom ntej no, txuas lub tiaj tiaj rov qab ntawm cov ntawv los xij rau pem hauv ntej ntawm boe bot siv Velcro. Thaum kawg, txuas cov xov hlau zoo thiab tsis zoo rau cov ntawv txhuas rau ntawm cov flaps. Nrog koj zoo siab, tam sim no koj tau ua tiav cov pob tw.

Kauj ruam 3: Circuit Court

Qhov Circuit
Qhov Circuit

Lub Circuit Court yog qhov yooj yim heev thiab ua tau yooj yim. Ua tibzoo saib daim duab thiab tsim kev sib tw ntawm koj Boe bot.

Kauj ruam 4: Txoj Cai

Nov yog tus lej rau boe bot.

'{$ STAMP BS2}

'{$ PBASIC 2.5}

'I/O Pin

'Mankaran Kaler

'Mr. Birch' Maze robot program 'Program txhawm rau nrhiav lub boebot los ntawm kev tshawb nrhiav

'---------- varibles ---------------

LMotor PIN 14 RMotor PIN 15

loopX VAR Lo lus

TIAB SA 850

RFF CON 650 Lstop CON 750 Rstop CON 750 LRF CON 650 RRF CON 850

temp VAR Byte 'khw muag khoom ib ntus

RunStatus DATA $ 00 'sib txawv khaws cia hauv ROM

'NYEEM RunStatus, ntsuas' Nyeem qhov sib txawv ntawm ROM

'temp = ~ temp' hloov tus nqi 0 rau 1 lossis 1 txog 0 'WRITE RunStatus, temp' Sau qhov sib txawv rov qab mus rau ROM 'YOG (temp> 0) THIAB KAWG' Txheeb xyuas yog tias tus nqi yog 1 'yog li xaus qhov program

txoj cai VAR Lo lus

VAR Lo Lus nrawm '---------- ua --------------- Ua GOSUB ForwardFast DEBUG? IN10 YOG IN10 = 0 THIAB HIGH 0 GOSUB LeftTurn ELSE LOW 0 ENDIF

DEBUG? IN11

YOG IN11 = 0 THIAB HIGH 1 GOSUB RightTurn ELSE LOW 1 ENDIF DEBUG CLS

LOOP

'------------- lus qhia ------------

Sab laug

Rau sab xis = 1 txog 120 PULSOUT LMotor, LRF PULSOUT RMotor, RFF NQE NTAWV

Txoj cai tig

Rau LoopX = 1 txog 120 PULSOUT LMotor, LFF PULSOUT RMotor, RRF NEXT RETURN

ForwardFast:

Rau qhov nrawm = 1 txog 300 PULSOUT LMotor, LFF PULSOUT RMotor, RFF NQE NTAWV

Pom zoo: