Bukit Mertajam, Penang

Controlling Mobile Robot via Android Bluetooth

INTRODUCTION

I believe today, everyone owns a smartphone. It’s a need for each of us. It’s a technology to make our lives easier. We use it for many things in our life, but have we really fully utilized it? Have you ever thought that your smartphone can control a robot? By downloading the free apps from playstore and doing some simple programming, you can control your robot from your smartphone.

HARDWARE REQUIRED

STEP BY STEP PREPARATION (HARDWARE)

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

2. After that, attach the CIKU to the aluminium 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, 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. First, search for Arduino BT Joystick Free in Playstore and install the app.  

2. There are two ways on connecting Android and 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

Related Posts

Comments (2)

what is the use of that dc jack ?

To power up the CIKU board.

Leave a comment

Loading...