How to Control an Arduino Car Via Bluetooth (for Beginners)
by caiomoraes in Circuits > Arduino
162467 Views, 301 Favorites, 0 Comments
How to Control an Arduino Car Via Bluetooth (for Beginners)
All we know that Arduino is an excellent prototyping platform, principally because it uses a friendly programming language and there are a lot of extra incredible components that provide us great experiences.
We can integrate the Arduino with differents shields or modules and build fantastic things. In this project i will show you how use the Bluetooth module to control a robot platform through commands coming from a smartphone.
Parts
Hardware:
- Arduino Uno
- Motor Shield L293D Driver
- Bluetooth Module
- Robot platform
Software:
- Arduino IDE
- Bluetooth RC Controller (you can download this app here)
Mount the Hardware
The mounting of the robotic platform is very easy. If you buy one like that, you will receive a manual with all steps.
To connect the electric circuit, you have to fit the shield on the Arduino and then connecting the motors to the shield. After that you have to connect the bluetooth module. The module pins depends on what you are using, but basically it has: VCC (connected to the 5V pin of the Arduino), GND (connected on GND on Arduino), RX (connected to the TX pin of the arduino) and TX (connected to the RX pin of the Arduino).
Software
The code is also uncomplicated.
- To control the motors, i used the library <AFMotor.h>.
- The communication between the smartphone and the Bluetooth module was done using the serial communication arduino.
- The app "Bluetooth RC Controller" send to the bluetooth module the following commands:
- Forward -> F
- Back -> B
- Left -> L
- Right -> R
- Forward Left -> G
- Forward Right -> I
- Back Left -> H
- Back Right -> J
- Stop -> S
- Front Lights On -> W
- Front Lights Off -> w
- Back Lights On -> U
- Back Lighst Off -> u
- Horn On -> V
- Horn Off -> v
- Extra On -> X
- Extra Off -> x
- Speed 0 -> 0
- Speed 10 -> 1
- Speed 20 -> 2
- Speed 30 -> 3
- .
- .
- .
- Speed 90 -> 9
- Speed 100 -> q
- Stop All -> D
In this project was used just the basic commands: Forward, Back, Left and Right.
The entire code is available for you to download.
Downloads
You Are Done
Now you have all you need to build your own robot controlled by a smartphone via Bluetooth. Easy and Funny.
THANK YOU