Bluetooth Controlled Robot With Spy Wireless Camera

13,515

145

79

Published

Introduction: Bluetooth Controlled Robot With Spy Wireless Camera

In this instructables i will show you how to make wireless robot controlled with Bluetooth module.the best feature of this robot is wireless camera working over wiffi.in above picture you can see my phone working as camera.my phone is connected to home wiffi and the Android app named AirDroid is used for Wireless camera.

for remote control over Bluetooth i have used this application Bluetooth Electronics


MUST WATCH VIDEO MUST WATCH VIDEO
Don't forget to like and subscribe

Step 1: Components Required

1.arduino uno

2.bluetooth module hc-05

3. DC Motors (4)

4.Robot base

5.motor driver l293d

6.android phone

7.12v battery

8.ultrasonic sensor hc sr-04

9.jumper wire's

Step 2: Schematics

as shown in have connected two Dc Motors in parallel combination for turning the robot.for turning to right. left side Motors will be on and for turning left. right side motors will be on.
connect ultrasonic sensor vcc pin to digital pin 12
trigger to pin 8
echo to pin 9.
connect tx of arduino to rx of Bluetooth module and rx of arduino to tx of Bluetooth module.
During uploading the program disconnect Bluetooth module.
as shown in figure for running Dc Motors supply external 12v power supply.
for arduino you can use regulated 5v supply but i have used Mobile phone otg power supply.
And i have used 12 v battery for running motors only.

Step 3: Arduino Programming

I have uploaded arduino program file.you can edit it according to your requirement.in this program i have used millis function instead of delay.when i used delay function it stopping all the program.this program is combination of two program one for motor driver and other for ultrasonic sensor.

for running millis function you have to install libraries. i have uploaded zip file. extract it and paste it into libraries folder of arduino ide.

Step 4: Configuring Android App

Download Bluetooth Electronics app from google play store
I have uploaded my kwl file of panel.you can import it as shown.you can edit it according to your requirement.

Step 5: Configuring Wireless Camera

Download AirDroid app from google play store.connect your phone to your home Wifi then enter above ip address shown in app. on other browser of other device connected on same network. click on camera icon shown in picture.you can see live streaming.

THANK YOU FOR WATCHING

DON'T FORGET TO VOTE FOR CONTEST

Share

    Recommendations

    • Make it Move Contest

      Make it Move Contest
    • Clocks Contest

      Clocks Contest
    • Planter Challenge

      Planter Challenge
    user

    We have a be nice policy.
    Please be positive and constructive.

    Tips

    Questions

    79 Comments

    Sir please tell me IN AIRDROID APP WITH PICTURE STREAMING AUDIO WILL BE THERE??

    in which version of the airdroid the camera can be accessed

    give us the version of airdroid to be used

    how to link the arduino program with arduino board which u have given

    Sir,we have taken your project from instructables and we have completed half of it.We are getting defects on the motor driver and we have already lost two boards.So please give us the connection of the motor driver to motors and arduino.

    sir,here in #include <elapsedmillis.h> its showing error what should do

    how to connect mobile with arduino ?

    Did this also avoid obstacles

    I haven't hc08 .i don't know.
    Try my code.if this works for hc08 late me know.

    #include <elapsedMillis.h>
    elapsedMillis timeElapsed;
    char BluetoothData; // the Bluetooth data received
    int switch1 = 11;
    int switch2 = 12;
    int trig_pin = 8;
    int echo_pin = 9;
    long echotime; //in micro seconds
    float distance; //in cm
    unsigned int interval = 100;

    void setup() {

    Serial.begin(9600);

    //Set Digital Pins 4 to 7 as Output
    pinMode(4,OUTPUT);
    pinMode(5,OUTPUT);
    pinMode(6,OUTPUT);
    pinMode(7,OUTPUT);
    pinMode(13,OUTPUT);
    pinMode(12,OUTPUT);
    pinMode(11,OUTPUT);
    //Set State of Pins all to LOW (0)
    digitalWrite(4,0);
    digitalWrite(5,0);
    digitalWrite(6,0);
    digitalWrite(7,0);
    digitalWrite(11,0);
    digitalWrite(12,0);
    digitalWrite(13,0);
    Serial.begin (9600);
    pinMode(trig_pin, OUTPUT);
    pinMode(echo_pin, INPUT);
    digitalWrite(trig_pin, LOW);
    }
    void loop() {
    motor();
    sensor();
    }

    void motor()
    {
    if (Serial.available()){
    BluetoothData=Serial.read();
    if(BluetoothData=='F'){ // Red Button Pressed
    digitalWrite(4,1); //Turn diital out 4 to High
    digitalWrite(5,0); //Turn digital out 5 to Low
    digitalWrite(6,1);
    digitalWrite(7,0);
    }

    if(BluetoothData=='B'){ // Yellow Button Pressed
    digitalWrite(5,1);
    digitalWrite(4,0);
    digitalWrite(6,0);
    digitalWrite(7,1);
    }
    if(BluetoothData=='f'||BluetoothData=='b'){ // Red or Yellow Button Released
    digitalWrite(4,0);
    digitalWrite(5,0);
    digitalWrite(6,0);
    digitalWrite(7,0);
    }
    if(BluetoothData=='L'){ // Green Button Pressed
    digitalWrite(6,1);
    digitalWrite(7,0);
    digitalWrite(4,0);
    digitalWrite(5,0);
    }
    if(BluetoothData=='R'){ // Blue Button Pressed
    digitalWrite(4,1);
    digitalWrite(5,0);
    digitalWrite(7,0);
    digitalWrite(6,0);

    }
    if(BluetoothData=='l'||BluetoothData=='r'){ // Green or Blue Button Released
    digitalWrite(7,0);
    digitalWrite(4,0);
    digitalWrite(5,0);
    digitalWrite(6,0);
    }
    if(BluetoothData=='G'){
    digitalWrite(13,1);
    }
    if(BluetoothData=='g'){
    digitalWrite(13,0);
    }
    if(BluetoothData=='P'){
    digitalWrite(12,1);
    }
    if(BluetoothData=='X'){
    digitalWrite(11,1);
    Serial.print("*XR241G232B248");
    }
    if(BluetoothData=='x'){
    digitalWrite(11,0);
    Serial.print("*XR000G000B000");
    }
    if(BluetoothData=='p'){
    digitalWrite(12,0);
    }

    delay(10);// wait 10 ms
    }
    }
    void sensor()
    {
    if (timeElapsed > interval)
    {
    digitalWrite(trig_pin, HIGH);
    delayMicroseconds(10);
    digitalWrite(trig_pin, LOW);
    motor();
    //get the result
    echotime= pulseIn(echo_pin, HIGH);
    distance= 0.0001*((float)echotime*340.0)/2.0;

    Serial.print("*D"+String(distance,1)+"*");
    timeElapsed = 0;
    }
    }

    /*try this code.

    i am also getting same error on arduino IDE 1.6.12.

    which version of arduino IDE are you using??

    use 1.6.5 version of arduino IDE*/

    I think now problem is your arduino.please try to upload simple code like blinking LED and if you succeed then try my code.

    Arduino: 1.6.5 (Windows XP), Board: "Arduino/Genuino Uno"

    Sketch uses 7,240 bytes (22%) of program storage space. Maximum is 32,256 bytes.

    Global variables use 247 bytes (12%) of dynamic memory, leaving 1,801 bytes for local variables. Maximum is 2,048 bytes.

    avrdude: stk500_recv(): programmer is not responding

    avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x60

    avrdude: stk500_recv(): programmer is not responding

    avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x60

    avrdude: stk500_recv(): programmer is not responding

    avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x60

    avrdude: stk500_recv(): programmer is not responding

    avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x60

    avrdude: stk500_recv(): programmer is not responding

    avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x60

    avrdude: stk500_recv(): programmer is not responding

    avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x60

    avrdude: stk500_recv(): programmer is not responding

    avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x60

    avrdude: stk500_recv(): programmer is not responding

    avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x60

    avrdude: stk500_recv(): programmer is not responding

    avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x60

    avrdude: stk500_recv(): programmer is not responding

    avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x60

    Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

    This report would have more information with

    "Show verbose output during compilation"

    enabled in File > Preferences.

    are you able to compile the code ??
    i think now the issue is due to the drivers or your arduino is not working properly.
    install drivers properly .

    hi pls help me...i need to sumit the project on monday...pls help me

    Arduino: 1.6.13 (Windows XP), Board: "Arduino/Genuino Uno"

    FHOJVNTIPH4TE74:33: error: stray '\302' in program

    Â pinMode(trig_pin, OUTPUT);

    ^

    FHOJVNTIPH4TE74:33: error: stray '\240' in program

    FHOJVNTIPH4TE74:34: error: stray '\302' in program

    Â pinMode(echo_pin, INPUT);

    ^

    FHOJVNTIPH4TE74:34: error: stray '\240' in program

    FHOJVNTIPH4TE74:35: error: stray '\302' in program

    Â digitalWrite(trig_pin, LOW);

    ^

    FHOJVNTIPH4TE74:35: error: stray '\240' in program

    FHOJVNTIPH4TE74:43: error: stray '\302' in program

    ^

    FHOJVNTIPH4TE74:43: error: stray '\240' in program

    FHOJVNTIPH4TE74:107: error: stray '\302' in program

    } Â

    ^

    FHOJVNTIPH4TE74:107: error: stray '\240' in program

    FHOJVNTIPH4TE74:113: error: stray '\302' in program

    Â delayMicroseconds(10);

    ^

    FHOJVNTIPH4TE74:113: error: stray '\240' in program

    FHOJVNTIPH4TE74:114: error: stray '\302' in program

    Â digitalWrite(trig_pin, LOW);

    ^

    FHOJVNTIPH4TE74:114: error: stray '\240' in program

    FHOJVNTIPH4TE74:116: error: stray '\302' in program

    Â //get the result

    ^

    FHOJVNTIPH4TE74:116: error: stray '\240' in program

    FHOJVNTIPH4TE74:117: error: stray '\302' in program

    Â echotime= pulseIn(echo_pin, HIGH);

    ^

    FHOJVNTIPH4TE74:117: error: stray '\240' in program

    FHOJVNTIPH4TE74:118: error: stray '\302' in program

    Â distance= 0.0001*((float)echotime*340.0)/2.0;

    ^

    FHOJVNTIPH4TE74:118: error: stray '\240' in program

    FHOJVNTIPH4TE74:119: error: stray '\302' in program

    Â

    ^

    FHOJVNTIPH4TE74:119: error: stray '\240' in program

    FHOJVNTIPH4TE74:120: error: stray '\302' in program

    Â Serial.print("*D"+String(distance,1)+"*");

    ^

    FHOJVNTIPH4TE74:120: error: stray '\240' in program

    FHOJVNTIPH4TE74:121: error: stray '\302' in program

    Â timeElapsed = 0;

    ^

    FHOJVNTIPH4TE74:121: error: stray '\240' in program

    exit status 1

    stray '\302' in program

    This report would have more information with

    "Show verbose output during compilation"

    option enabled in File -> Preferences.