Controlling Mobile Robot via Android Bluetooth

INTRODUCTION

I believe that today, everyone owns a smartphone and it’s like a need for each of us. It is a technology to make our life easier.We have used it for many things in our life, however have we really fully utilize it? Have you ever think that your smartphone can control a robot? By downloading the free apps from playstore and do some simple programming, you can control your robot from your smartphone. So now, we will figure out how to utilize our smartphone.¬† ūüėĬ†

HARDWARE REQUIRED

STEP BY STEP PREPARATION (HARDWARE)

1. Firstly, setup the tires, motors, DC Jack (Male) and Battery holder to the Alluminium robot chassis as shown in the Figure below.

2. After that, attach the CIKU to the alluminium robot chassis.

3. Then, stack the 2Amp Motor Driver Shield to CIKU.

4. Next, stack the Cytron Bluetooth Module to the Cytron Xbee Shield. Then, you can stack the shield to the CIKU. Make sure that Tx(shield) is set to D1(CIKU) and Rx(Shield) is set to D0(CIKU).

5. Lastly, put the 3.7V 1100mAh Li-Ion battery to the batery holder. 

STEP BY STEP PREPARATION (SOFTWARE)

Please refer to Getting Started with CIKU.

  

STEP BY STEP PREPARATION (ANDROID)

1. Firstly, search for Arduino BT Joystick Free in Playstore and install the app.  

2. There is two way on how to connect the android to the BlueBee. 

(a).Click “CONNECT” button and a window like shown in the figure will pop up. Then, choose the ‘BLUEBEE’ and connect. Make sure you already turned ON¬†your device’s bluetooth. If you do not turned it ON, the apps will ask a permission to turn ON the bluetooth once you pressed the “CONNECT” button.

(b). Turn ON the bluetooth on android and pair with ‘BLUEBEE’. Then, run the Android Joystick BT app and touch the “CONNECT” button on the screen. It will connect the android to the BLUEBEE.

3. Now you are able to control the robot by using your smartphone.

CODE OVERVIEW

For you to be able write the code in Arduino IDE style, Arduino library need to be included in the code. 

[code lang=”c” highlight=””]
#include Arduino.h;
#include HardwareSerial.h;
[/code]

The Arduino Joystick Bt will send #b=0# if you do not press any button on the apps. If button forward is pushed, it will send #b=1# to the BlueBee. So it have to read at least 5 times to get all the value sent by the Arduino Joystick Bt and only the forth value is change when the button is pushed.

[code lang=”c” highlight=””]
if(Serial_available())
{
delay(10);

Serial_read();
Serial_read();
Serial_read();
key = Serial_read();
Serial_read();
}[/code]

 

DEMONSTRATION VIDEO

Buy

2 thoughts on “Controlling Mobile Robot via Android Bluetooth

Leave a Reply

Your email address will not be published. Required fields are marked *