Cov txheej txheem:

Qhov Me Me thiab Cutest Arduino Obstacle Zam Txim Tus Neeg Hlau: 5 Kauj Ruam
Qhov Me Me thiab Cutest Arduino Obstacle Zam Txim Tus Neeg Hlau: 5 Kauj Ruam

Video: Qhov Me Me thiab Cutest Arduino Obstacle Zam Txim Tus Neeg Hlau: 5 Kauj Ruam

Video: Qhov Me Me thiab Cutest Arduino Obstacle Zam Txim Tus Neeg Hlau: 5 Kauj Ruam
Video: Nco kuv me me - Luj Yaj (Cover by Kab Npauj Laim) 2024, Hlis ntuj nqeg
Anonim
Qhov Me Me thiab Cutest Arduino Obstacle Zaum Zaum Ua Neeg Hlau
Qhov Me Me thiab Cutest Arduino Obstacle Zaum Zaum Ua Neeg Hlau

Nkees ntawm cov neeg hlau clumsy loj uas nqa ib nrab txee hauv koj chav? Koj puas kam nqa koj cov neeg hlau nrog koj tab sis nws tsuas yog tsis haum hauv koj lub hnab ris? Ntawm no koj mus! Kuv nthuav qhia rau koj Minibot, qhov ntxim nyiam tshaj plaws thiab qhov nyuaj tshaj plaws kev tiv thaiv neeg hlau koj tuaj yeem (puas tau puas tau) muab tso ua ke!

Kauj Ruam 1: Cov khoom thiab daim uas koj xav tau

Cov khoom thiab cov khoom koj yuav xav tau
Cov khoom thiab cov khoom koj yuav xav tau
Cov khoom thiab cov khoom koj yuav xav tau
Cov khoom thiab cov khoom koj yuav xav tau
Cov khoom thiab cov khoom koj yuav xav tau
Cov khoom thiab cov khoom koj yuav xav tau

Cov ntawv me me (4.5 cm x 3.5 cm), 17 qhov ntev thiab 2 kab ntawm 5 qhov dav. Koj ua tus tsim tus neeg hlau yam tsis muaj nws, tab sis nws yog qhov zoo uas muaj yog tias koj npaj hloov kho tus neeg hlau.

Arduino Nano Cov. Kuv siv qhov uas los nrog cov pins twb tau txuas rau lub rooj tsavxwm, tab sis koj kuj tseem tuaj yeem siv tus pinless arduino nano thiab txuas cov kab ncaj qha rau lub rooj tsavxwm

9V roj teeb. Yog, lub roj teeb zoo.

9V lub roj teeb tuav. (tau nws los ntawm cov khoom ua si qub)

2 kev sib hloov ua haujlwm txuas ntxiv mus (lawv zoo li SG () servos, tab sis lawv tau ua tiav qhov kev sib hloov sib txuas tas li. Kuv yuav lawv ntawm no

2 lub log roj hmab. Tsuas yog saib ib ncig. Muaj tseeb tiag cov khoom ua si qub qhov chaw uas tsis xav tau nws lub log.

Cov kab. Ib pawg ntawm lawv. Tsis muaj ib yam zoo li muaj ntau cov cables.

Ultrasonic sensor. 4 pin model. Ebay, Amazon lossis lwm qhov chaw. Lawv txhua tus zoo ib yam.

3D luam tawm chassis. Koj tuaj yeem pom cov ntawv 3D ntawm no

Kauj ruam 2: Thiab Txoj Cai

Tsis muaj foob pob hluav taws kev tshawb fawb ntawm no. Tsuas yog tus lej yooj yim yooj yim uas ua rau tus neeg hlau mus tom ntej yog tias tsis muaj ib yam dab tsi pom hauv 15 cm, thiab tig rov qab yog tias qee yam ze dua 15 cm.

Tsuas yog rub cov ntawv txt, thiab luam -paus cov cai hauv koj Arduino interface.

Kauj Ruam 3: Muab cov khoom tso rau hauv qhov chaw raug

Muab cov khoom tso rau hauv qhov chaw raug
Muab cov khoom tso rau hauv qhov chaw raug
Muab cov khoom tso rau hauv qhov chaw raug
Muab cov khoom tso rau hauv qhov chaw raug

Lub khob cij, Arduino, lub ntsuas hluav taws xob thiab lub roj teeb mus rau sab saud ntawm lub chassis, tab sis TSIS TXHOB muab cov khoom tso rau hauv YET. Koj yuav tsum xaim txhua yam ua ntej. (yog, kuv tau ua qhov yuam kev no) (ob zaug)

2 servos tsuas yog kaw rau hauv qis dua ntawm lub chassis. Yog, koj tuaj yeem tso cov 2 no tam sim no.

Cov log tau txuas rau cov servo shafts nrog cov xov me ntsis, qee cov kua nplaum kub, lossis nrog cov khawv koob. Koj xaiv.

Kauj Ruam 4: Thiab Cov Xov … Huag Tub

Ntawm no los qhov tsis zoo. cov xov hlau Muaj ntau cov xov hlau, thiab SO qhov chaw me me.

Cia Pib los ntawm ultrasonic sensor.

  • Vcc -> +5V ntawm Arduino
  • Trig -> D11 ntawm Arduino
  • Ncha -> D12 ntawm Arduino
  • GND -> GND ntawm Arduino (ib qho ntawm 2 GND pins ntawm Arduino)

Kev pabcuam 1:

  • Txiv kab ntxwv hlau -> D9 ntawm Arduino
  • Hlau liab -> +5V ntawm Arduino
  • Hlau xim av -> GND ntawm Arduino (ib qho ntawm 2 GND pins ntawm Arduino)

Kev pabcuam 2:

  • Txiv kab ntxwv hlau -> D10 ntawm Arduino
  • Hlau liab -> +5V ntawm Arduino
  • Hlau xim av -> GND ntawm Arduino (ib qho ntawm 2 GND pins ntawm Arduino)

Roj teeb:

  • Hlau liab -> Vin tus pin ntawm Arduino
  • Cov xaim dub -> GND ntawm Arduino (ib qho ntawm 2 GND pins ntawm Arduino)

Tam sim no koj tsuas yog yuav tsum ua tib zoo ntim txhua cov xov hlau hauv lub chassis thiab kaw ob qho tib si. Kuv tus neeg hlau puv tas li uas xav tau cov hlua roj hmab kom nws tsis txhob nchuav nws lub siab.

Kauj Ruam 5: Hauv Kev Ua

Image
Image

Koj tus neeg hlau yuav mus tom ntej kom nws pom qee yam tsawg dua 15 cm.

Koj tuaj yeem hloov qhov kev ncua deb ntawm kab kab no:

yog (nrug <= 15)

Koj tseem tuaj yeem hloov pauv mus rau tom ntej thiab thim rov qab los ntawm kev hloov kho cov kab no:

myservo1.write (XXX); myservo2.write (XXX);

qhov twg XXX = 0 yog nrawm nrawm rau myservo1 thiab XXX = 180 yog nrawm nrawm rau myservo2

thiab XXX = 90 yuav tsum nres tag nrho rau ob qho kev pabcuam.

Pom zoo: