Cov txheej txheem:

MARIO KART: 5 Kauj Ruam
MARIO KART: 5 Kauj Ruam

Video: MARIO KART: 5 Kauj Ruam

Video: MARIO KART: 5 Kauj Ruam
Video: Mario VS Luigi VS Sonic in the Kart Race | Magnetic Games 2024, Hlis ntuj nqeg
Anonim
MARIO KEV
MARIO KEV
MARIO KEV
MARIO KEV

Cov ncauj lus ntawm Kev Ntsuas Hluav Taws Xob rau tshuab mechatronics thiab cov khoom siv hluav taws xob, yog ob qho kev kawm tsim los rau kev kawm paub yuav ua haujlwm li cas nrog kev tswj hwm lub zog hluav taws xob, ua haujlwm tiag tiag lossis teeb liab los ntawm kev siv cov ntsiab lus yav dhau los pom hauv lwm yam kev kawm. Kev sib tw mario kart yog txoj haujlwm rau cov tub ntxhais kawm txhawm rau txhim kho lub peev xwm xws li ua haujlwm ua ke, tsim txuj ci, tsim qauv thiab txhawb kev muaj tswv yim ntawm txhua tus neeg koom nrog kom ua tau lub tsheb zoo tshaj plaws rau kev txav chaw, lub zog (hauv riam phom) thiab kev tsim kom zoo nkauj. Kev sib tw yuav tshwm sim sab hauv kev teeb tsa ntawm ITESM Chihuahua. Lub tsev kawm ntawv yuav muab cov tub ntxhais kawm txhua yam ntaub ntawv xav tau, tab sis lawv pub dawb ntxiv cov khoom kom ua tau zoo dua.

Kauj Ruam 1: Kev piav qhia dav dav ntawm Txoj Haujlwm

Kev piav qhia dav dav ntawm Txoj Haujlwm
Kev piav qhia dav dav ntawm Txoj Haujlwm

Mario kart yog txoj haujlwm tsim los txhim kho qee lub peev xwm rau cov tub ntxhais kawm kom kawm paub txog hluav taws xob, siv lub micro controller arduino. Cov kev sib tw yog cov tsheb tsim los ntawm cov tub ntxhais kawm, lub tsheb yuav tsum muaj riam phom txhawm rau tawg lub zais pa, txhua lub tsheb muaj peb lub zais pa thiab qhov kawg muaj txoj sia nyob yuav yeej.

Ob qhov kev kawm tau koom nrog hauv kev sib tw, Cov cuab yeej ntsuas ntawm mechatronics thiab kuaj cov khoom siv hluav taws xob, cov tub ntxhais kawm ntawm ob pab pawg yuav sib ntaus los ua qhov zoo tshaj plaws hauv kev sib tw mario kart.

Nws tau tshwm sim thaum tus tsim lub koob tsheej ntawm ITESM CUU hauv lub semester Agu-Dec 2016.

Txhua lub tsheb yuav tsum muaj riam phom thiab peb lub zais pa, sai li sai tau txhua lub zais pa hauv koj lub tsheb raug tsoo, koj yuav tawm ntawm kev sib tw, zaum kawg sawv yuav yog tus yeej kev sib tw. Kev tswj hwm lub tsheb yuav tsum yog wireless, dhau ntawm lub xov tooj ntawm tes, khoos phis tawj lossis lwm yam khoom siv uas muaj peev xwm xa cov cim mus rau arduino daim thaiv tswj lub cev.

Kauj ruam 2: Cov ntaub ntawv

Khoom siv
Khoom siv
Khoom siv
Khoom siv
Khoom siv
Khoom siv

Arduino UAS. Yog qhov qhib-qhov chaw tsim qauv ua qauv raws qhov yooj yim-rau-siv kho vajtse thiab software. Arduino muab qhov qhib-qhov thiab siv tau yooj yim-rau-siv lub cuab yeej, rau kev sau cov cai thiab xa nws mus rau koj lub rooj tsavxwm.

Lub cev muaj zog. Nws yog lub cev ntev 5 cm lub cev muaj zog, nrog lub zog nkag ntawm 12 volts thiab lub zog tso tawm ntau tshaj ntawm 1.55 watts qhov hnyav ntawm 65 grams thiab lub zog siab tshaj plaws ntawm 0.071 Nm.

Adafruit lub cev tiv thaiv kab mob rau arduino. Puas yog daim ntaub thaiv siv los tswj lub cav. Hloov chaw ntawm kev siv lub latch thiab Arduino's PWM pins, peb muaj kev mob siab rau PWM tsav tsheb nti rau ntawm lub nkoj. Cov nti no ua haujlwm txhua lub cav thiab kev tswj nrawm dua I2C

SparkFun bluetooth khub nyiaj. Bluetooth Mate zoo ib yam li peb BlueSMiRF modem, tab sis nws tau tsim tshwj xeeb los siv nrog peb Arduino Prosand LilyPad Arduinos. Cov modems no ua haujlwm raws li cov yeeb nkab txuas (RX/TX), thiab yog qhov hloov pauv tau zoo rau cov xov tooj txuas. Txhua qhov dej ntws los ntawm 2400 txog 115200bps tuaj yeem hla tau yooj yim los ntawm koj lub khoos phis tawj mus rau koj lub hom phiaj.

Bluetooth module HC-06. Raws li tus qauv qhev yog ib qho yooj yim thiab muaj txiaj ntsig rau cov haujlwm me me uas koj saib mus rau kev sib txuas lus yooj yim ntawm koj lub xov tooj ntawm tes thiab Arduino lossis lwm yam kev tswj hwm micro.

Rechargeable roj teeb 12v. Lub zog siv hluav taws xob no yog siv los pub lub cev muaj zog, cov khoom siv hluav taws xob thiab lub tshuab hluav taws xob bluetooth, thaum siv 4 lub roj teeb 1.5v ntxiv rau pub riam phom.

Riam phom Nws yog qhov pib tiv taus cua sov, dhau los ntawm kab hluav taws xob, peb ua kom sov cov hlau uas nyob ntawm ntug ntawm cov ntoo ntoo.

Khoom siv.

Laser txiav tshuab

Cautin zoo

Lap saum

Software.

AutoCad

Corel Kos

Kauj Ruam 3: Tsim thiab Sib Sau

Tsim thiab Sib Sau
Tsim thiab Sib Sau

Txog kev tsim qauv peb siv AutoCad muaj nyob ntawm lub chaw xam, tsim yog lub tsheb yooj yim zoo li tus duab plaub, nrog 4 kab uas txhawb nqa lub ru tsev ntawm lub tsheb. Peb kos lub chassis, uas muaj nyob hauv ib thooj hauv qab, 3 phab ntsa thiab ib lub ru tsev, peb tawm ntawm ib sab khoob los tswj cov arduino sab hauv ntawm lub tsheb. Kev luam ntawv ntawm cov khoom tau ua hauv lub tshuab txiav laser muaj nyob hauv chav kuaj.

Txhawm rau xa cov ntaub ntawv los ntawm autocad mus rau chaw nres nkoj usb, hom kev kos duab yuav tsum yog hauv Corel Draw hom kom lub tshuab txiav laser tuaj yeem nyeem nws thiab tshem nws.

Kev sib dhos muaj nyob rau ntawm txhua qhov chaw uas peb kos rau ntawm lub software, peb kuj tau txuas lub tshuab mus rau lub chassis thiab dhau ntawm lub qhov nyob nruab nrab ntawm ntu hauv qab, peb hla cov xov txuas nrog lub tshuab.

Cov riam phom thiab balloons tau nyob saum lub ru tsev ua ntej ntawm lwm qhov feem.

Kev tsim riam phom tau hloov pauv ntau zaus, tab sis qhov kev tsim qauv zaum kawg tau ua nrog ob lub pas ntoo sib cais los ntawm 3 cm thiab xaim xaim raws cov pas thiab ib txoj hlua txuas rau hauv ob lub ntsia hlau nyob ntawm ntug, txoj hlua yuav sov thiab tawg. cov zais pa.

Cov riam phom tau pub nrog 4 lub roj teeb ntawm 1.5 volts txhua thiab txuas nrog ib ntus.

Txhawm rau xa lub teeb liab, peb siv lub xov tooj hauv xov tooj, peb tau ua lub ntsej muag sib txuas lus ntawm lub xov tooj ntawm tes nrog lub bluetooth module thiab xa cov ntaub ntawv mus rau pawg thawj coj saib arduino tom qab ntawd los ntawm cov khoom xa tawm, xa tam sim no xav tau rau lub tshuab ua haujlwm.

Kauj ruam 4: Code

Cov cai uas peb siv yog lus C hauv arduino lub khoos phis tawj computer. Cov kab ntawm cov cai yog cov hauv qab no:

#include #include #include "utility/Adafruit_MS_PWMServoDriver.h" #suav nrog int bluetoothTx = 51; // TX-O tus pin ntawm bluetooth khub, Arduino D2 int bluetoothRx = 50; // RX-Kuv tus pin ntawm bluetooth khub, Arduino D3 int i, ia, vDI, vDD, vTI, vTD, DI, DD; SoftwareSerial bluetooth (bluetoothTx, bluetoothRx); Adafruit_MotorShield AFMS = Adafruit_MotorShield (); Adafruit_DCMotor *MotorDI = AFMS.getMotor (1); Adafruit_DCMotor *MotorDD = AFMS.getMotor (2); Adafruit_DCMotor *MotorTI = AFMS.getMotor (3); Adafruit_DCMotor *MotorTD = AFMS.getMotor (4); teeb tsa tsis muaj dab tsi () {Serial.begin (9600); // Pib qhov saib xyuas ntawm 9600bps bluetooth.begin (115200); // Lub Bluetooth Mate tsis ua tiav rau 115200bps bluetooth.print ("$"); // Luam peb zaug ib leeg zuj zus bluetooth.print ("$"); bluetooth.print ("$"); // Nkag mus hom hais kom ua qeeb (100); // Kev ncua sijhawm luv, tos tus Mate xa rov qab CMD bluetooth.println ("U, 9600, N"); // Ib ntus Hloov baudrate mus rau 9600, tsis muaj qhov sib npaug // 115200 tuaj yeem nrawm dhau lub sijhawm rau NewSoftSerial xa cov ntaub ntawv kom ntseeg tau bluetooth.begin (9600); // Pib bluetooth serial ntawm 9600 AFMS.begin (); MotorDI-> setSpeed (150); MotorDI-> khiav (mus tom ntej); MotorDI-> khiav (tso tawm); MotorDD-> setSpeed (150); MotorDD-> khiav (FORWARD); MotorDD-> khiav (tso tawm); MotorTI-> setSpeed (150); MotorTI-> khiav (mus tom ntej); MotorTI-> khiav (tso tawm); MotorTD-> setSpeed (150); MotorTD-> khiav (mus tom ntej); MotorTD-> khiav (tso tawm); } void loop () {yog (bluetooth.available ()) // Yog tias bluetooth xa ib lub cim {i = bluetooth.read (); } yog (Serial.available ()) // Yog tias cov khoom raug ntaus hauv tus saib xyuas lub luag haujlwm {// Xa ib lub cim twg Serial monitor luam tawm mus rau bluetooth bluetooth.print ((char) Serial.read ()); } yog (ia! = i) {hloov (i) {rooj plaub 119: bluetooth.println ("w"); vDI = 250; VDD = 250; TSI = 250; TZS = 250; DIAB = 1; DD = 1; tawg; rooj plaub 101: bluetooth.println ("e"); vDI = 220; VDD = 50; TSI = 220; TZS = 50; DIAB = 1; DD = 1; tawg; rooj plaub 100: bluetooth.println ("d"); vDI = 250; VDD = 250; TSI = 250; TZS = 250; DIAB = 1; DD = 2; tawg; rooj plaub 115: bluetooth.println ("s"); vDI = 0; vDD = 0; TSI = 0; vTD = 0; DIAB = 1; DD = 1; tawg; rooj plaub 97: bluetooth.println ("a"); VDD = 250; vDI = 250; TZS = 250; TSI = 250; DIAB = 2; DD = 1; tawg; rooj plaub 113: bluetooth.println ("q"); VDD = 250; vDI = 50; TZS = 250; TSI = 50; DIAB = 1; DD = 1; tawg; rooj plaub 120: bluetooth.println ("x"); vDI = 220; VDD = 220; TSI = 220; VTD = 220; DIAB = 2; DD = 2; tawg; } MotorDI-> setSpeed (vDI); MotorDI-> khiav (DI); MotorDD-> setSpeed (vDD); MotorDD-> khiav (DD); MotorTI-> setSpeed (vTI); MotorTI-> khiav (DI); MotorTD-> setSpeed (vTD); MotorTD-> khiav (DD); iav = i; }}

Kauj ruam 5: Kev sib tw

Kev sib tw tau hais txog kev tawg lwm tus balloons, raws li tau piav qhia hauv kev taw qhia. Nov yog daim vis dis aus ntawm kev sib tw. Lub tsheb liab sib npaug yog lub tsheb peb tau tsim. Peb YUAV TAU CHAMPIONS.

Pom zoo: