Very Simple to Create Arduino Bluetooth Spy Robot With Android RemoteControl App

Introduction: Very Simple to Create Arduino Bluetooth Spy Robot With Android RemoteControl App

In this project you will see how simple mixture of different technologies and third-party apps allows to create a rather complex toy.

The robot does two things:

1. Arduino based spy robot moves according to commands delivered from Android RemoteControl app via bluetooth.

2. The robot transmits video via wifi throught a third party directly to RemoteControl Android app, which is very convenient since you manage the robot and see what is going on in one single Android app

But the key advantage is how simple it is to create such a spy robot

Step 1: Platform and Wirering

The project iinludes:

1. Standard Turtle platform (with build-in battery module)
2. HC-06 Bluetooth module
3. Arduino Mega ADK (but any other Arduino is fine)
4. Motor shield to manage motors up to 2A
5. Android phone (on the second photo) which should be mounted in front of the robot. It serves as a camera
6. Android phone/tablet which will be used as a remote control using self-developed RemoteControl app

The project involves two flows of data: commands which manage the robot come from an Android app via bluetooth connection, which is established using HC-06, while video comes through a wifi connection

The project uses third-party IP Webcam app, which is installed on the phone. The video is tranferred to a RemoteControll app which is developed by myself using App Inventor. The RemoteControll app is installed on another Android device like phone or tablet. The RemoteControl app both receives video stream and send commands via bluetooth

Step 2: Arduino Code

#define CON_MOTOR1 0
#define CON_MOTOR2 0

// Motor shield uses four pins - 4, 5, 6, 7 to manage the motors

// 4 and 7 — for direction, 5 and 6 — for speed

#define SPEED_1 5
#define DIR_1 4
#define SPEED_2 6
#define DIR_2 7

// Shortcuts for possible robot movements

#define FORWARD 0
#define BACKWARD 1
#define LEFT 2
#define RIGHT 3

// Variable for bluetooth buffer

int RX_buff;

/* * This function is used to manage actual movements */

void go (int newDirection, int speed) {

boolean motorDirection_1, motorDirection_2;
switch ( newDirection ) {
case FORWARD: motorDirection_1 = true; motorDirection_2 = true; break;
case BACKWARD: motorDirection_1 = false; motorDirection_2 = false; break;
case LEFT: motorDirection_1 = true; motorDirection_2 = false; break;
case RIGHT: motorDirection_1 = false; motorDirection_2 = true; break;

// In case of motor set-up mistakes just change the numbers

motorDirection_1 = CON_MOTOR1 ^ motorDirection_1;
motorDirection_2 = CON_MOTOR2 ^ motorDirection_2;

// Let's move!

analogWrite(SPEED_1, speed);
analogWrite(SPEED_2, speed);
digitalWrite(DIR_1, motorDirection_1);
digitalWrite(DIR_2, motorDirection_2);

void setup() {


// Sets pins 4, 5, 6, 7 to output mode

for(int i = 4; i <8; i++)
pinMode(i, OUTPUT);



void loop() {

// Reading bluetooth data

RX_buff =;

// Responding to bluetooth data

if (RX_buff == 1) {

go(FORWARD, 125);

if (RX_buff == 2){
go(LEFT, 80);


if (RX_buff == 4){
go(BACKWARD, 70);


if (RX_buff == 3){

go(RIGHT, 80);

// Stop,if necessary

if (RX_buff == 5 || RX_buff == 0){
analogWrite(SPEED_1, 0);
analogWrite(SPEED_2, 0);


Step 3: RemoteControl App - App Inventor Scheme

1. The principal element is BluetkothClient.Send1ByteNumber, which sends integer numbers to Arduino via bluetooth. When received by Arduino, those integer numbers are converted to motor commands.

2.The interface of the RemoteControl app is very simple - just four buttons for the relevant FORWARD, LEFT, RIGHT and BACK movements as well as STOP button.

3. The RemoteControl app also uses WebViewer component, which is used as recepient of the wifi video stream from the Android phone mounted on the robot. Again, the video is streamed by a thied party app (IP Webcam), which is installed on the Android phone. The advantage of IP Webcam is that it sreatms video directly to a web browser, which in RemoteControl app is replaced by WebViewer component. So, the video is streamed directly to your robot management app!

Microcontroller Contest

Participated in the
Microcontroller Contest

Be the First to Share


    • Photography Challenge

      Photography Challenge
    • Fix It Speed Challenge

      Fix It Speed Challenge
    • Raspberry Pi Contest

      Raspberry Pi Contest



    5 years ago

    how to initiate ip webcam inside app inventor 2? I am stuck creating them


    Reply 4 years ago

    me also , if u found a solution sen me at


    6 years ago

    And please provide the block diagram too

    Konstantin Kalushev
    Konstantin Kalushev

    Reply 6 years ago

    the block diagram is in step 3. unfortunately, I cannot reveal the program, since it is generated by AppInventor


    Reply 4 years ago

    Codes for MIT APP INVENTOR 2, for the Spy Camera


    5 years ago

    Amazing robot, this is exactly what I was thinking to do too !

    Only 2 questions :

    1. Do you think it is possible to command also the Robot by Wifi in the following way :

    Remote App sends command via Wi-Fi to Robot Phone and Robot Phone send to Arduino bia bluetooth ? This would make the range of the robot much bigger and maybe it could be controller from bigger distance . Or even via 4G !

    2. For your current setup, would it be possible to attach the phone to a servo arm and also control that by BT so you can also move the camera up down ?


    6 years ago

    Can you please provide the app which is used in controlling the robot.

    Welcome to instructables! You robot looks awesome, you'll have to update us on the information he recovers. You should think about entering this into our First Time Authors Challenge.