Introduction: 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.
Step 1: Parts
- Arduino Uno
- Motor Shield L293D Driver
- Bluetooth Module
- Robot platform
- Arduino IDE
- Bluetooth RC Controller (you can download this app here)
Step 2: 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).
Step 3: 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.
Step 4: You Are Done
Now you have all you need to build your own robot controlled by a smartphone via Bluetooth. Easy and Funny.
5 People Made This Project!
We have a be nice policy.
Please be positive and constructive.
please add diagram of connection of cables
i using the same things like you did, however my bluetooth module havent "blink" for should i said it not on. i connect the Vcc and GND the way it should be but the RX and TX are the one that i didnt understan. i using a arduino mega and its have 3 port of both RX and TX and i connected it at RX1 and TX1. still nothing happen. can you help me out ??
ok i just solve that, my mistake. but now the robot didnt move even its already be connected
Bro at the end of each code you entered the word "end", what will happen if u dont used "end" ? Will the mortors will keep on running