Hello Robotics geeks.
One of the first projects you practice on when learning Arduino is to build a car.
A simple car is a chassis with motors controlled by a motor driver and an Arduino board to operate the movement of the car.
Several methods can be used to control the car, an IR remote, a joystick with an RF transmitter, phone application, or simply make it automated by adding a few sensors (Obstacle Avoidance, Ultrasonic, Line tracker). I will have a post on each method of those, but now I prefer to talk about controlling the car with a Mobile Application since it is much easier now using new platforms like RemoteXY.
RemoteXY allows you to create the app with simple graphics and provides you with the code to program your Arduino board.
Let’s start building our project:
First, build a chassis of your choice and assemble it as follows.
- Arduino Board of your choice.
- Motor Driver (L298N H-Bridge).
- Bluetooth Module (HC-05 or 06).
- Battery (9V battery).
- Jumper wires.
Now let’s build the application:
We want the car to move forward, backward, right and left, we can add few tweaks too like make it turn around itself in place.
Frist drag a joystick, place wherever you like, and click on it to show the properties.
In the configuration tab, Set the communication method to Bluetooth, select your board, the communication module you’re using, and the IDE you will code on.
Set the connection interface to “Hardware Serial“, the Serial Port to “Serial 0(RX) and 1(TX), and the baud rate to 9600″.
You can add Additional Control like a Centering button or a Gravity sensor button so you can control the car using the orientation of your phone.
Finally, add an ON/OFF button.
- Press “Get source code“
- Download the code into the Arduino IDE.
- Install RemoteXY library for Arduino IDE.
- Compile the source code and upload it to the Arduino board using the Arduino IDE.
- Correctly connect the Bluetooth module to the Arduino board.
- Install the mobile app RemoteXY ver.4.1.1 for smartphone/tablet.
- Connect to Arduino using the mobile app.
Feel free to ask any question.
Think . Build . Code
and stay creative.