Cov txheej txheem:

Arduino Tsheb Tswj Via Bluetooth App: 4 Cov Kauj Ruam (nrog Duab)
Arduino Tsheb Tswj Via Bluetooth App: 4 Cov Kauj Ruam (nrog Duab)

Video: Arduino Tsheb Tswj Via Bluetooth App: 4 Cov Kauj Ruam (nrog Duab)

Video: Arduino Tsheb Tswj Via Bluetooth App: 4 Cov Kauj Ruam (nrog Duab)
Video: How I Made this Electric Car that can go Anywhere 2024, Kaum ib hlis
Anonim
Arduino Tsheb Tswj Ntawm Bluetooth App
Arduino Tsheb Tswj Ntawm Bluetooth App
Arduino Tsheb Tswj Ntawm Bluetooth App
Arduino Tsheb Tswj Ntawm Bluetooth App

Txhua yam peb paub tias Arduino yog lub platform ua qauv zoo tshaj plaws, qhov tseem ceeb vim tias nws siv cov lus tsim ua phooj ywg thiab muaj ntau yam ntxiv tsis txaus ntseeg uas ua rau peb muaj kev paub zoo.

Peb tuaj yeem sib xyaw Arduino nrog cov ntawv sib txawv lossis cov qauv thiab tsim cov khoom zoo. Hauv qhov haujlwm no kuv yuav qhia koj li cas siv Bluetooth module los tswj lub platform neeg hlau los ntawm cov lus txib los ntawm lub xov tooj smartphone.

Kauj Ruam 1: Qhov Chaw

Qhov
Qhov
Qhov
Qhov
Qhov
Qhov

Kho vajtse:

  • 1 x Arduino Uno
  • 1x Tsav Shield L293D Tsav Tsheb
  • 1 x Bluetooth Module
  • 1x Neeg Hlau platform
  • 4x Dupont Hlau rau Bluetooth Module (Txiv neej rau Poj Niam)
  • 4x Dupont Hlau rau lub cav (Txiv neej rau Txiv neej)
  • 2x motors + 2x Log
  • 1x Caster Log

Software:

  • Arduino IDE Cov
  • A rau B USB Cable
  • Bluetooth RC Controller (koj tuaj yeem rub tawm daim ntawv thov no ntawm no)

Kauj Ruam 2: Sib dhos Arduino Tsheb

Sib dhos Arduino Tsheb
Sib dhos Arduino Tsheb
Sib dhos Arduino Tsheb
Sib dhos Arduino Tsheb
Sib dhos Arduino Tsheb
Sib dhos Arduino Tsheb

Kev teeb tsa lub platform neeg hlau yog yooj yim heev. Yog tias koj yuav ib yam li ntawd, koj yuav tau txais phau ntawv qhia nrog txhua qib.

Ua ntej tshaj 2 lub cav mus rau lub platform neeg hlau.

Qhov thib ob nce lub log caster mus rau lub platform neeg hlau.

Qhov thib peb nce Arduino Uno mus rau lub platform neeg hlau thiab tso lub cav thaiv mus rau Arduino Uno.

Thib plaub txuas rau sab laug thiab sab xis lub cev muaj zog cov hlau qhia hauv daim duab. (Nco tseg: Liab Hlau yog + & Cov Hlau Dub yog -)

Thib tsib txuas Bluetooth Module:

  • RXD to TXD on Arduino Uno
  • TXD to RXD on Arduino Uno
  • VCC rau 5V ntawm Arduino Uno
  • GND rau GND ntawm Arduino Uno

Kauj ruam 3: Software

Arduino uno yog qhov yooj yim heev rau program.

- Txhawm rau tswj lub cav, Kuv siv lub tsev qiv ntawv AFMotor.h suav nrog saum toj no.

- Kev sib txuas lus ntawm lub xov tooj ntawm tes thiab Bluetooth module tau ua tiav siv cov lus sib txuas lus arduino.

- Lub app "Bluetooth RC Controller" xa mus rau bluetooth module cov lus txib hauv qab no:

  • Mus tom ntej -> F.
  • Rov qab -> B.
  • Sab laug -> L.
  • Yog lawm -> R.
  • Mus rau sab laug -> G.
  • Forward Right -> Kuv
  • Rov qab sab laug -> H.
  • Rov qab sab xis -> J.
  • Nres -> S.
  • Teeb pem hauv ntej -> W.
  • Pem Hauv Ntej Teeb Tawm -> w
  • Back Lights On -> U
  • Back Lights Off -> ua
  • Horn On -> V.
  • Horn Tawm -> v
  • Ntxiv rau -> X
  • Ntxiv Ntxiv -> x
  • Ceev 0 -> 0
  • Ceev 10 -> 1
  • Ceev 20 -> 2
  • Ceev 30 -> 3
  • Ceev 90 -> 9
  • Ceev 100 -> q
  • Nres Txhua -> D.

Hauv qhov haujlwm no kuv tau teeb tsa 2 cov lus txib:

1. Qhov (Forward, Back, Left and Right)

2. Full Command (Forward, Back, Left and Right) thiab tseem (Forward Left, 1. Forward Right, Back Left, Back Right)

Tag nrho cov cai muaj rau koj rub tawm.

Kauj Ruam 4: Tsis Nco Qab Qhia, Like thiab Vote !

Pom zoo: