loading

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

Hardware:

  • 1x Arduino Uno
  • 1x Motor Shield L293D Driver
  • 1x Bluetooth Module
  • 1x Robot platform
  • 4x Dupont Wire for Bluetooth Module (Male to Female)
  • 4x Dupont Wire for motors (Male to Male)
  • 2x motors + 2x Wheels
  • 1x Caster Wheel

Software:

  • Arduino IDE
  • A to B USB Cable
  • Bluetooth RC Controller (you can download this app here)

Step 2: Assembling the Arduino Car

The mounting of the robotic platform is very easy. If you buy one like that, you will receive a manual with all steps.

Firstly mount the 2 motor onto the robot platform.

Secondly mount the caster wheel onto the robot platform.

Thirdly mount the Arduino Uno onto the robot platform and place the motor shield onto the Arduino Uno.

Fourthly connect the left and the right motor's wire indicated in the picture. (Note: Red Wire is + & Black Wire is -)

Fifthly connect the Bluetooth Module:

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

Step 3: Software

The Arduino uno is very easy to program.

- To control the motors, I used the library AFMotor.h included above.

- 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 Lights 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 I have programmed 2 commands:

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

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

The entire code is available for you to download.

<p>Hi, I am getting a lot of error messages when I try to compile the code, and I couldn't figure out how to fix them. Could you please help me? Here are the error messages </p><p>c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr5/crtatmega328p.o:(.init9+0x0): undefined reference to `main'</p><p>C:\Users\me\AppData\Local\Temp\ccrNvWHT.ltrans0.ltrans.o: In function `latch_tx':</p><p>C:\Users\me\Documents\Arduino\libraries\adafruit-Adafruit-Motor-Shield-library-99381df/AFMotor.cpp:57: undefined reference to `digitalWrite'</p><p>C:\Users\me\Documents\Arduino\libraries\adafruit-Adafruit-Motor-Shield-library-99381df/AFMotor.cpp:60: undefined reference to `digitalWrite'</p><p>C:\Users\me\Documents\Arduino\libraries\adafruit-Adafruit-Motor-Shield-library-99381df/AFMotor.cpp:64: undefined reference to `digitalWrite'</p><p>C:\Users\me\Documents\Arduino\libraries\adafruit-Adafruit-Motor-Shield-library-99381df/AFMotor.cpp:71: undefined reference to `digitalWrite'</p><p>C:\Users\me\Documents\Arduino\libraries\adafruit-Adafruit-Motor-Shield-library-99381df/AFMotor.cpp:74: undefined reference to `digitalWrite'</p><p>C:\Users\me\AppData\Local\Temp\ccrNvWHT.ltrans0.ltrans.o:C:\Users\me\Documents\Arduino\libraries\adafruit-Adafruit-Motor-Shield-library-99381df/AFMotor.cpp:77: more undefined references to `digitalWrite' follow</p><p>C:\Users\me\AppData\Local\Temp\ccrNvWHT.ltrans0.ltrans.o: In function `enable':</p><p>C:\Users\me\Documents\Arduino\libraries\adafruit-Adafruit-Motor-Shield-library-99381df/AFMotor.cpp:39: undefined reference to `pinMode'</p><p>C:\Users\me\Documents\Arduino\libraries\adafruit-Adafruit-Motor-Shield-library-99381df/AFMotor.cpp:40: undefined reference to `pinMode'</p><p>C:\Users\me\Documents\Arduino\libraries\adafruit-Adafruit-Motor-Shield-library-99381df/AFMotor.cpp:41: undefined reference to `pinMode'</p><p>C:\Users\me\Documents\Arduino\libraries\adafruit-Adafruit-Motor-Shield-library-99381df/AFMotor.cpp:42: undefined reference to `pinMode'</p><p>C:\Users\me\Documents\Arduino\libraries\adafruit-Adafruit-Motor-Shield-library-99381df/AFMotor.cpp:49: undefined reference to `digitalWrite'</p><p>C:\Users\me\AppData\Local\Temp\ccrNvWHT.ltrans0.ltrans.o: In function `initPWM3(unsigned char) [clone .isra.0]':</p><p>C:\Users\me\Documents\Arduino\libraries\adafruit-Adafruit-Motor-Shield-library-99381df/AFMotor.cpp:261: undefined reference to `pinMode'</p><p>C:\Users\me\AppData\Local\Temp\ccrNvWHT.ltrans0.ltrans.o: In function `initPWM4(unsigned char) [clone .isra.1]':</p><p>C:\Users\me\Documents\Arduino\libraries\adafruit-Adafruit-Motor-Shield-library-99381df/AFMotor.cpp:316: undefined reference to `pinMode'</p><p>collect2.exe: error: ld returned 1 exit status</p>
how to insert leds to car and code for it.
<p>I will think about that and come up with a code.</p>
<p>Could you please post some pictures without the cardboard cover ...</p>
<p>Yes I will soon</p>
Should be a typo with two 'forwardleft'.<br><br> case 'G':<br> forwardleft();<br> break;<br> case 'I':<br> forwardleft();<br> break;
<p>Yes, your correct I will correct this soon.</p><p>Here's the correct one</p><p>case 'G':<br>forwardleft();<br>break;<br>case 'I':<br>forwardright();<br>break;</p>
<p>I'm new to all this and would like to try it with my son. Where is the best website/place to get parts? Thank you!</p>
<p>You can buy these parts for cheap from Banggood but delivery time will be longer. I buy from this website as saves money but eBay would be great too</p>
how can i connect txd and rxd on arduino when i have a shield on it where to insert the wire coming from txd and rxd on bt module
<p>What I did is I put </p><ul><br><li>RXD cable to TXD on Arduino Uno<li>TXD cable to RXD on Arduino Uno</ul><div>then I inserted the shield on top of the cable</div>
Do you have any video worki g of your car.<br>voted
<p>I will upload a video in a day.</p><p>Thanks</p>
Voted. Lithium instead of lead acid would be much better for runtime. Great job.
<p>Thanks, I had lead acid when I was doing this but now running on LiPo. Lol</p>

About This Instructable

3,108views

65favorites

License:

Bio: Just an ordinary teen who likes to work with Arduino and other programming electronics and 3D Printers
More by Slk_Stephane:Arduino Car Controlled Via Bluetooth App CardBoard the Hero (Solar Powered) Portable Potty 
Add instructable to: