Cov txheej txheem:

Maze Solving Robot (Boe-bot): 5 Kauj Ruam
Maze Solving Robot (Boe-bot): 5 Kauj Ruam

Video: Maze Solving Robot (Boe-bot): 5 Kauj Ruam

Video: Maze Solving Robot (Boe-bot): 5 Kauj Ruam
Video: Line Follower Robot using ArduinošŸ”„ 2024, Hlis ntuj nqeg
Anonim
Maze Solving Robot (Boe-bot)
Maze Solving Robot (Boe-bot)

Qhov no yuav ua li cas-yuav qhia koj yuav tsim thiab ua rau koj tus kheej lub maze daws cov neeg hlau, siv cov ntaub ntawv yooj yim thiab neeg hlau. Qhov no yuav suav nrog coding ib yam, yog li lub khoos phis tawj tseem xav tau.

Kauj Ruam 1: Nrhiav Chassis

Nrhiav Chassis
Nrhiav Chassis

Txhawm rau tsim lub maze daws cov neeg hlau, ib tus yuav tsum xub pom tus neeg hlau. Hauv qhov no, kuv chav kawm thiab kuv tau qhia kom siv dab tsi ntawm tes, uas, thaum lub sijhawm, yog boe-bot (saib saum toj no). Lwm yam neeg hlau uas tso cai rau cov tswv yim thiab cov txiaj ntsig ntxiv nrog rau cov phiaj xwm yuav tsum ua haujlwm ib yam.

Kauj Ruam 2: Txhim Kho Koj Lub Cev

Txhim Kho Koj Lub Cev
Txhim Kho Koj Lub Cev
Txhim Kho Koj Lub Cev
Txhim Kho Koj Lub Cev
Txhim Kho Koj Lub Cev
Txhim Kho Koj Lub Cev

Qhov no yog kauj ruam loj, yog li kuv yuav rhuav nws rau koj ua peb ntu: 1. Bumper S (khoom khov) 2. Sib koom 3. Bumper M (txav) (Txhua yam no sib haum rau qhov kev txiav txim ntawm cov duab saum toj no)

1. Txhawm rau ua kom lub pob tw ruaj khov, txhua yam koj xav tau yog ib qho protrusion ntawm ob sab ntawm txoj kev tig mus rau sab. Qhov kawg yuav tsum tau npog nrog cov khoom siv. Hauv qhov no, Kuv siv cov ntawv txhuas, txawm li cas los xij, lwm yam hlau lossis cov khoom tuaj yeem ua haujlwm tau. Lub protrusion yuav tsum tau ruaj khov thiab ruaj khov rau lub chassis, dua li siv qee yam muaj zog dua li cov kws ua haujlwm daim kab xev (Nws yog tib txoj kev tsis nyob ruaj khov ntawm kuv qhov pov tseg thaum lub sijhawm). Thaum koj cov protrusion tau tsau nrog rau cov khoom siv ntawm nws qhov kawg, cov xaim yuav tsum tau pub los ntawm ob qho kawg ntawm qhov ua tawm mus rau lub khob cij lossis lub qhov nkag.

2. Kev sib koom tes yuav tsum yoog raws, ruaj khov, thiab tuaj yeem khaws nws cov duab. Lub pob khawm lub caij nplooj ntoo hlav tuaj yeem ua kom zoo tab sis yog tias tsis muaj, cov khoom siv tau tuaj yeem siv tau. Kuv siv cov kua nplaum kub yooj yim rau qhov tseeb tias nws tsuas yog muaj. Nws ua haujlwm rau qhov xwm txheej uas qhov kev sib zog sib raug zoo nyob deb ntawm qhov nws muaj qhov qeeb qeeb ntawm kev rov qab los. Qhov no yuav tsum hla cov protrusions ntawm ob sab tab sis tsis dhau mus raws li tom qab ntawd nws yuav tsis ua haujlwm ntxiv lawm. *Nco ntsoov tias nws tsis yog qhov nyuaj rau ua kom sib koom*

3. Lub pob tawb txav tau zoo ib yam li lub bumper ruaj khov tshwj tsis yog muab txuas nrog rau lub chassis, nws tau txuas rau qhov hloov pauv sib koom ua ke. Qhov no ib yam nkaus thiab muaj cov khoom siv coj los ntawm nws qhov kawg nrog rau cov xov hluav taws xob khiav mus rau lub khob cij/cov ntawv nkag. Me ntsis ntawm cov khoom sib txhuam tuaj yeem siv rau ntawm ob sab ntawm lub bumper kom tso cai rau kev nkag siab ntawm phab ntsa los ze rau ntawm lub kaum ntiav.

Qhov kawg tshwm sim yuav tsum yog qhov system ntawm ob qhov txav mus thiab ob lub hauv caug nyob ruaj ruaj, sib koom ua ke uas txav mus dawb tab sis rov qab khov kho thiab nrawm, thiab plaub lub xov hlau coj mus rau hauv pawg thawj coj saib xyuas vaj huam sib luag.

Kauj Ruam 3: Tsim Lub Rooj Tswjhwm Saib Circuit

Tsim lub Rooj Tswjhwm Saib Xyuas Circuit
Tsim lub Rooj Tswjhwm Saib Xyuas Circuit

Cov kauj ruam no yog qhov yooj yim thiab nrawm. LEDs yog nyob ntawm yeem. Ob qho ntawm koj lub pob tw (ib yam khoom lossis txav mus los) yuav tsum tau nqes mus rau hauv av thaum lwm qhov yuav tsum tau txuas rau qhov tso tawm/tawm tswv yim. LEDs tuaj yeem ua tiav ntawm ob pab pawg los qhia seb lawv puas ua haujlwm lossis tsis yog, txawm li cas los xij, qhov no tsis tas yuav tsum ua. Qhov tseem ceeb tshaj plaws uas tau ua ntawm no yog thaum nyob ib leeg, tus neeg hlau yog lub hauv paus tawg. Txawm li cas los xij, thaum M (txav mus) thiab S (khoom) bumper ua kev sib cuag nws ua tiav qhov Circuit Court, qhia rau tus neeg hlau hloov cov lus qhia lossis thim rov qab, thiab lwm yam. Thaum qhov no ua tiav, tam sim no peb tuaj yeem txav mus rau qhov coding.

Kauj Ruam 4: Coding Koj Tus Neeg Hlau

Coding Koj Neeg Hlau
Coding Koj Neeg Hlau
Coding Koj Neeg Hlau
Coding Koj Neeg Hlau

Cov kauj ruam no yog qhov yooj yim los tuav, tab sis nyuaj ua. Ua ntej tshaj, koj yuav tsum txheeb xyuas qhov kev hloov pauv twg yog lub cav. Tom qab ntawd koj yuav tsum txhais tag nrho koj cov nrawm sib txawv (qhov no yuav xav tau tsawg kawg plaub: txoj cai rau pem hauv ntej, sab xis rov qab, sab laug rau pem hauv ntej, sab laug rov qab). Nrog rau qhov no, koj tuaj yeem pib coding. Koj xav kom tus neeg hlau txuas ntxiv mus kom txog rau thaum nws tsoo qee yam, yog li lub voj nrog R + L rau tom ntej yuav xav tau. Tom qab ntawv tus lej lej: nws yuav tsum qhia rau tus neeg hlau tias yuav ua dab tsi, thaum twg yuav tsum ua, thiab thaum twg los tshuaj xyuas yog tias nws xav tau ua. Cov cai saum toj no ua qhov no los ntawm IF nqe lus. Yog tias txoj cai bumper kov, ces tig sab laug. Yog tias sab nraub qaum tsoo, tig sab xis. Yog tias ob lub bumpers kov, thim rov qab, ces tig sab xis. Txawm li cas los xij, tus neeg hlau yuav tsis paub tias tig sab xis lossis rov qab txhais li cas, yog li cov kev hloov pauv yuav tsum tau txhais uas yog feem ntau ntawm cov cai yog dab tsi. I.e.

Txoj cai:

PULSOUT LMOTOR, LRev

PULSOUT RMOTOR, RFast

tom ntej no, rov qab

Qhov no tsuas yog txhais qhov "raug" yog rau tus neeg hlau kom nkag siab. Txhawm rau hu rau qhov sib txawv no, GOSUB _ xav tau los siv. Txhawm rau sab xis, nws yog GOSUB Txoj Cai. Qhov kev hu xov tooj no yuav tsum ua tiav rau txhua qhov tig thiab txav mus thaum qhov hloov pauv tsuas yog xav tau ua tiav ib zaug. Qhov no yog yuav luag txhua qhov tsis raug, txawm li cas los xij, thaum siv rau lwm yam uas tsis yog "Stamps in Class"

Kauj Ruam 5: Xeem Koj Tus Neeg Hlau

Qhov no feem ntau yog yam koj yuav siv sijhawm ntau ntawm koj ua. Kev sim yog txoj hauv kev zoo tshaj kom paub tseeb tias koj tus neeg hlau ua haujlwm. Yog tias nws tsis yog mus hloov qee yam thiab sim dua. Kev sib haum xeeb yog yam koj tab tom nrhiav, yog li sim ua kom txog thaum nws ua haujlwm txhua lub sijhawm. Yog tias koj tus neeg hlau tsis txav mus, nws tuaj yeem yog tus lej, chaw nres nkoj, lub cev muaj zog, lossis lub roj teeb. Sim koj lub roj teeb, tom qab ntawv chaws, tom qab ntawd chaw nres nkoj. Kev hloov lub cev yuav tsum yog qhov kawg. Yog tias muaj qee yam tawg, tom qab ntawd hloov nws nrog cov khoom siv zoo dua kom ntseeg tau tias cov khoom tiv taus ntev. Thaum kawg, yog tias koj plam kev cia siab, txiav tawm, ua qee qhov kev ua si, tham nrog phooj ywg, tom qab ntawd sim saib qhov teeb meem los ntawm lub teeb sib txawv. Zoo siab tshawb nrhiav!

Pom zoo: