Cov txheej txheem:

Phau ntawv ntawm Warzone Tower Defense Nrog Arduino Tsim: 5 Kauj Ruam
Phau ntawv ntawm Warzone Tower Defense Nrog Arduino Tsim: 5 Kauj Ruam

Video: Phau ntawv ntawm Warzone Tower Defense Nrog Arduino Tsim: 5 Kauj Ruam

Video: Phau ntawv ntawm Warzone Tower Defense Nrog Arduino Tsim: 5 Kauj Ruam
Video: Night 2024, Kaum ib hlis
Anonim
Phau ntawv ntawm Warzone Tower Defense Nrog Arduino Tsim
Phau ntawv ntawm Warzone Tower Defense Nrog Arduino Tsim
Phau ntawv ntawm Warzone Tower Defense Nrog Arduino Tsim
Phau ntawv ntawm Warzone Tower Defense Nrog Arduino Tsim
Phau ntawv ntawm Warzone Tower Defense Nrog Arduino Tsim
Phau ntawv ntawm Warzone Tower Defense Nrog Arduino Tsim

Taw qhia

Peb yog pab pawg YOJIO (Koj tsuas yog kawm hauv JI ib zaug, yog li khaws nws.) UM-SJTU Kev Koom Tes Koom Tes nyob hauv thaj chaw tsev kawm ntawv ntawm Shanghai Jiao Tong University, Minhang, Shanghai. VG100 yog lub hauv paus tseem ceeb ntawm kev tsim vaj tsev rau cov tub ntxhais kawm ntawv tshiab, uas lub hom phiaj ntawm kev txhim kho kev sib koom tes ua haujlwm thiab kev coj noj coj ua.

Rau peb thawj qhov haujlwm, txhua pab pawg yuav tsum tau ua kab thiab cov ntawv pej thuam. Peb kab txav ntawm peb qhov ncaj racetracks ntawm daim ntawv pej thuam. Muaj 4 txoj kab nyob ib puag ncig tus pej thuam thiab kab yauv nyob ntawm peb ntawm lawv. Txhawm rau tiv thaiv tus pej thuam, nws yuav tsum nres kab nrog lub teeb ci laser nyob saum lub pej thuam. Cov qhab nia kawg yog ua raws tus qauv ntawm cov kab, kev ua tau zoo thiab qhov hnyav ntawm tus pej thuam: qhov ntau dua cov pej thuam thiab cov kab ua ntej raug tua, cov qhab nia siab dua txhua pab pawg tuaj yeem tau txais. Saib daim duab thib peb.

Txwv

→ Cov kev sib tw (Muab hauv qhov kev ua si)

Feem ntau dub nrog 4cm dav kab dawb nyob hauv nruab nrab

Dawb nres kab hla txoj kev ob qho 1m thiab 0m los ntawm hauv qab ntawm tus pej thuam

Kev tiv thaiv thaj tsam 2.5m txog 2m ntawm hauv qab (nrog chaw nyob)

→ Cov kab

Kho vajtse:

Board Cov pawg hauv qab ua los ntawm PMMC

∙ Yuav tsum muaj 15cm*10cm pem hauv ntej lub rooj tsavxwm

∙ Lub teeb pom kev tso rau hauv kab rov tav 5cm saum toj ntawm txoj kab hauv ntej

Txoj Haujlwm:

∙ Nrhiav kev suav nrog

∙ Kev tswj ceev ntawm 0.2 txog 0.3 m/s

∙ Tsiv mus rau ib txoj kab ncaj

∙ A 2 txog 4 vib nas this nres ntawm kab nres nruab nrab thiab tsis tuaj yeem raug tua nyob rau lub sijhawm ntawd

∙ Ib qho chaw nyob ruaj khov ntawm kab dawb ntawm ib sab ntawm tus pej thuam

Tower Daim ntawv pej thuam

∙ Ua nrog daim ntawv A4

∙ Tuav nws qhov hnyav ntawm daim ntawv xwb

∙ Tsawg kawg 60 cm siab

∙ Tso cai kom nyam nrog cov kua nplaum nkaus xwb

∙ Tsis muaj tuab dua 3 daim ntawv nyob txhua qhov chaw hauv tus pej thuam

∙ Xws li tsuas yog 1 lub nqaj laser nyob saum.

Cov npe khoom

1. Lub kab:

Arduino UNO ¥ 33.00*2

Tsav tsav tsav L298N ¥ 8.40

Tsav GA12-N20 ¥ 14.90

Lub Cev Muaj Zog 3PI miniQ N20 ¥ 2.50

Coupler M3 ¥ 2.90

Lub thawv roj teeb 9V 6F22 ¥ 6.88

Roj teeb 9V ¥ 9.90

Chassis 15*20cm ¥ 28.00

Caster 27 hli ¥ 2.00

Kab Nrhiav Sensor SEN0017 ¥ 22.00

Lub teeb Sensor BH1750 ¥ 6.14

Nylon Screws M3 ¥ 12.00

Screws M2*8 M2*10 M2*12 M3*8 Muab los ntawm lub chaw sim

Dupont Wires Muab los ntawm lub chaw sim

Breadboard 5cm*8cm Muab los ntawm chav kuaj

Log 72mm Muab los ntawm chav kuaj

2. Lub pej thuam:

Huab Terrace +Servo SG90 ¥ 21.9

360 degree Servo DS04-NFC ¥ 33

Ultrasonic Sensor SR04 ¥ 3.6*4

Nrhiav Sensor DFRobot ¥ 22

Yees duab

Vim yog teeb pom kev tsis zoo nyob rau hnub ua si, peb tsis tuaj yeem muab cov vis dis aus ntawm qhov kev ua si. Hloov chaw, peb tau tshaj tawm cov vis dis aus ntawm kev sim kab ntawm Youku. Qhov txuas txuas yog

Kauj Ruam 1: Qhia Tshooj I: Ua Tus Kab Mob

Kev Qhia Ntu Kuv: Ua Tus Kab Mob
Kev Qhia Ntu Kuv: Ua Tus Kab Mob
Kev Qhia Ntu Kuv: Ua Tus Kab Mob
Kev Qhia Ntu Kuv: Ua Tus Kab Mob
Kev Qhia Ntu Kuv: Ua Tus Kab Mob
Kev Qhia Ntu Kuv: Ua Tus Kab Mob
Kev Qhia Ntu Kuv: Ua Tus Kab Mob
Kev Qhia Ntu Kuv: Ua Tus Kab Mob

Qhov pom tawg tau qhia hauv daim duab 1.

Kauj Ruam 1: Kos Daim Duab Circuit (raws li tau qhia hauv daim duab 2).

Kauj Ruam 2: Sib Sau Cov Motors thiab Log (raws li tau qhia hauv daim duab 3).

(1) Txhim kho lub cev muaj zog nrog tus ncej, M2.5 (*4) ceev thiab ntsia hlau.

(2) Txuas lub log thiab lub cev muaj zog nrog txuas txuas. Siv M2 (*4) ntsia hlau los kho lawv.

(3) Txhim kho lub log thoob plaws tom qab ntawm peb kab nrog M3 (*4) ntsia hlau thiab txiv ntseej.

Kauj Ruam 3: Ua Vertical Board (raws li tau qhia hauv daim duab 4).

(1) Txiav ib daim ntawv crimp rau hauv qhov loj ntawm 12cm*15cm.

(2) Txiav ob lub ces kaum thiab ntxig daim ntawv rau hauv qhov kis ntawm kab. (Daim duab yuav muab)

(3) Kaw lub rooj tsavxwm ntsug rau kab nrog 502.

Kauj Ruam 4: Sib Sau Cov Sensors (raws li tau qhia hauv daim duab 5).

(1) Kos kab 5 cm saum toj no hauv av ntawm pawg thawj coj.

(2) Muab lub teeb pom kev pom ntawm kab rov tav kom lub teeb pom kev pom lub phaj sib phim cov kab kos.

(3) Txhim kho lub teeb pom kev zoo nrog kab xev.

(4) Siv peb lub M3*30 nylon kab los txhim kho peb lub ntsuas ntsuas kom deb li deb ntawm lub ntsuas cua thiab hauv av yog kwv yees li 1.3cm, qhov deb tshaj plaws kom pom tseeb.

Kauj Ruam 5: Kev sib dhos ua ke

(1) Txhim kho lub thawv roj teeb thiab lub cav tsav lub cav ntawm qhov kab, tsawg kawg 5*M3 cov ntsia hlau thiab cov txiv ntoo yuav tsum tau ua. Txhim kho lub log thoob plaws tom qab (raws li tau qhia hauv daim duab 6).

(2) Khaws lub khob cij nyob hauv qab kab kab thiab Arduino board ntawm kab. (Raws li qhia hauv daim duab 7).

(3) Txuas cov ntu cuam tshuam nrog Dupont Lines. (Saib Cov Lus Qhia hauv daim duab ntu ntu)

(4) Siv rab phom vuam thiab lub chaw povtseg txhawm rau txhawm rau txhuam txhua qhov chaw uas xoob. (Ceev faj! Kub! Ua nws raws li kev saib xyuas! Tsis tas yuav tsum tau ua.)

Kauj Ruam 2: Qhia Ntu II: Ua Lub Tsev

Qhia Tshooj II: Ua Tus Ntauwd
Qhia Tshooj II: Ua Tus Ntauwd
Qhia Tshooj II: Ua Tus Ntauwd
Qhia Tshooj II: Ua Tus Ntauwd
Qhia Tshooj II: Ua Tus Ntauwd
Qhia Tshooj II: Ua Tus Ntauwd
Qhia Tshooj II: Ua Tus Ntauwd
Qhia Tshooj II: Ua Tus Ntauwd

Qhov pom tawg tau qhia hauv daim duab 1 thiab 2.

Kauj Ruam 1: Tsim Lub Hauv Paus

(1) Khawb ib daim ntawv A4 kom ob sab luv kov. (Raws li qhia hauv daim duab 3).

(2) Qhib daim ntawv tais. Ntxiv daim ntawv los ntawm sab hauv sab ntawm 1) thiab xyuas kom tseeb tias ob qho kov ob sab hauv 1) tam sim no ua ke ntawm kab nruab nrab. (Raws li qhia hauv daim duab 4 thiab 5)

(3) Sib npaug muab sab A nrog cov kua nplaum dawb thiab lo nws nrog sab nraub qaum ntawm sab B (Tsis xav tau ntau cov kua nplaum dawb) kom peb tuaj yeem tau txais daim duab peb sab tsis xwm yeem. (Raws li qhia hauv daim duab 6 thiab 7)

(4) Rov ua dua 1) txog 3) 5 zaug kom tau txais 6 qhov prism tib yam.

(5) Sib npaug muab faib ua 2 txheej ntawm txhua qhov prism nrog cov kua nplaum dawb. Khaws cov prisms ua ke kom peb tau txais qhov sib npaug hexagon prism. (Raws li qhia hauv daim duab 8)

Kauj Ruam 2: Ua Qhov Txuas (Raws li qhia hauv daim duab 9)

(1) Npaj ib daim ntawv.

(2) Kos ib daim duab hexagon uas ntev ntawm sab yog 7.5 cm.

(3) Ua lub duab plaub (2cm*7.5cm) ib sab ntawm txhua sab ntawm lub hexagon ib txwm muaj

Kauj Ruam 3: Tsim Sab Qaum Teb ntawm Ntauwd

(1) Khawb ib daim ntawv A4 kom ob sab ntev mus kov. (Xa mus rau daim duab 5 tab sis nco ntsoov qhov sib txawv)

(2) Rov ua dua (2) txog (5) hauv Kauj Ruam 1.

(3) Ua 12 daim ntawm 50mm*50mm ntawv.

(4) Khawb cov ntawv uas hais hauv Step3, 3) hauv ib nrab.

(5) Txuas cov kua nplaum dawb rau ntawm ib sab sab hauv uas tau hais hauv Step3, 4). (Raws li qhia hauv daim duab 9)

(6) Muab cov ntawv nplaum tso rau sab nraud ntawm qhov prism. Txoj kab nruab nrab ntawm ib qho me me yuav tsum ua ke nrog rau sab saud ntawm prism. (Raws li qhia hauv daim duab 10) Tom qab ntawd ua tib yam rau lwm 5 npoo.

(7) Ib yam nkaus, muab ntau daim ntawv me rau ntawm tus pej thuam. Txawm li cas los xij, lub sijhawm no lawv yuav tsum tau sab hauv. (Raws li qhia hauv daim duab 11) Tom qab ntawd ua tib yam rau lwm 5 ntug sab hauv.

(8) Txiav txhua ntu uas tawm ntawm ntug prism. (Raws li qhia hauv 12)

(9) Khawb tag nrho daim ntawv me me (yog tias ua tau) txhawm rau txhim kho cov qauv. (Raws li qhia hauv daim duab 13)

(10) Rov Ua Dua Step3 6) txog 9) ntawm qhov kawg ntawm tus qauv. Khaws nws mus rau qhov txuas.

Kauj Ruam 4 Tsim qhov txuas thib ob

(1) Kos 48 kab sib law liag, sib npaug rau sab luv ntawm daim ntawv A4. Txhua ob kab nyob sib ze yuav tsum muaj qhov nrug deb ntawm 5 (mm).

(2) Khawb daim ntawv raws kab. Dash kab txhais tau tias koj yuav tsum quav daim ntawv rau koj, thiab kab ntawv puv txhais tau tias koj yuav tsum quav daim ntawv rov qab rau koj. Qhov txiav tawm ntawm cov khoom yuav zoo li daim duab 14.

(3) Siv cov kua nplaum dawb los lo ib daim ntawv rau saum daim ntawv corrugated, Kos lwm daim ntawv rau hauv qab. (Daim duab 15)

(4) Txiav daim ntawv corrugated ua 12 (cm)*15 (cm)

Kauj Ruam 5 Tsim sab saum toj ntawm daim ntawv ntauwd (servo, lub zog, laser thiab Arduino ib feem)

(1) Sib sau ua ke saum huab nrog SG90 servo thiab laser nqaj txuas. Siv 502 yog tias tsim nyog.

(2) Txuas lub ntsuas qhov ntsuas ntawm huab cua. Nws yuav tsum nruj me ntsis hauv lub dav hlau ntsug nrog lub teeb ci laser. (Raws li qhia hauv daim duab 16)

(3) Kos 2 kab hla dub hla kab ntawm daim npav ntawv nrog daim ntawv dawb ntawm nws. Kab yuav tsum yog 0.5 cm dav. Tom qab ntawd ua tag nrho (lub vojvoog = 0.6cm) nyob nruab nrab.

(4) Kaw lwm sab ntawm lub rooj tsavxwm ntawm servo hauv qab no. Muab huab huab saum nws. (Saib daim duab 17)

(5) Txhim kho Arduino, daim ntawv qhia zaub mov thiab roj teeb nyob rau sab saum toj ntawm tus pej thuam thiab lub ntsuas hluav taws xob ultrasonic ntawm tus pej thuam. (Raws li qhia hauv daim duab 18)

Kauj Ruam 3: Qhov Ua tiav zaum kawg ntawm Kab thiab Ntauwd

Qhov Zaum Kawg ntawm Kab thiab Ntauwd
Qhov Zaum Kawg ntawm Kab thiab Ntauwd
Qhov Zaum Kawg ntawm Kab thiab Ntauwd
Qhov Zaum Kawg ntawm Kab thiab Ntauwd
Qhov Zaum Kawg ntawm Kab thiab Ntauwd
Qhov Zaum Kawg ntawm Kab thiab Ntauwd

Saib cov duab saum toj no.

Kauj ruam 4: Teeb meem Shooting

1 Peb tau xaiv lub ntsuas hluav taws xob hloov pauv me me thaum xub thawj. Nws tsuas tuaj yeem taug qab 2cm-dav kab dawb, tab sis kev sib tw muab 4cm-dav kab dawb rau taug qab.

Kev daws: Siv tsawg kawg 3 qhov ntsuas hluav taws xob ywj siab. Koj tuaj yeem kho qhov kev ncua deb ntawm txhua ob ntawm lawv, yog li lub tsheb tuaj yeem taug qab kab nrog txhua qhov dav.

2 360-degree servo nyuaj rau tswj nws lub kaum sab xis. Peb tsuas tuaj yeem tswj nws txoj kev taw qhia thiab nrawm ntawm kev sib hloov.

Tshuaj: Khaws lub teeb pom kev deb ntawm lub sam thiaj huab. Kos tus ntoo khaub lig kab dub ntawm daim ntawv. Muab daim ntawv tso rau sab saum toj ntawm 360-degree servo (hauv qab huab terrace). Thaum lub ntsuas hluav taws xob pom kab dub, 360-degree servo yuav tsum nres ib zaug kom nws tuaj yeem tig raws 90 degree hauv kev sib hloov.

3 Ntau yam khoom yuav tsum tau muab tso rau saum daim ntawv pej thuam, tab sis tsis muaj chaw ntau li.

Tshuaj: Khaws ib lub rooj tsav xwm corrugated. Nws muab qhov chaw nqa khoom ntxiv.

Kauj Ruam 5: Cov neeg ua tim khawv

Hyperlink ntawm cov khoom:

Kab kab:

detail.tmall.com/item.htm?spm=a230r.1.14.4…

item.taobao.com/item.htm?spm=a230r.1.14.42…

detail.tmall.com/item.htm?id=524061190057

item.taobao.com/item.htm?spm=a1z09.2.0.0. T…

item.taobao.com/item.htm?spm=a1z09.2.0.0. T…

item.taobao.com/item.htm?spm=a1z09.2.0.0. T…

item.taobao.com/item.htm?spm=a230r.1.14.19…

item.taobao.com/item.htm?spm=a230r.1.14.32…

detail.tmall.com/item.htm?id=533054527075&…

item.taobao.com/item.htm?spm=a230r.1.14.51…

detail.tmall.com/item.htm?id=20955552239&s…

detail.tmall.com/item.htm?spm=a230r.1.14.7…

item.taobao.com/item.htm?spm=a1z09.2.0.0.3…

detail.tmall.com/item.htm?id=21713236278&s…

item.taobao.com/item.htm?spm=a1z0d.6639537…

item.taobao.com/item.htm?spm=a230r.1.14.11…

Ntauwd ntau:

item.taobao.com/item.htm?spm=a1z09.2.0.0. I…

item.taobao.com/item.htm?spm=a1z09.2.0.0. I…

detail.tmall.com/item.htm?id=41248598447&s…

item.taobao.com/item.htm?spm=a1z09.2.0.0.m…

Pom zoo: