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

Comments

author
SprasanthKumar (author)2017-04-23

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

author
SprasanthKumar (author)2017-04-22

How to upload program in aurdino uno

author
ARI RAJESH (author)2017-02-20

how to connect mobile with arduino ?

author
kathait (author)2017-01-16

Did this also avoid obstacles

author
Aadarshsrivas (author)2016-12-27

Can we use hc08 instead of hc05

author

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

author

ok

thanx for reply

author
Kamal rjn (author)2016-12-02

help me

author

#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*/

author

help me bro pls

author

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

author

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.

author

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 .

author
Kamal rjn (author)2016-12-03

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

author
Kamal rjn (author)2016-12-02

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.

author

Which program are you using??
Please send the code & have you installed all the libraries.
No need of this
"Show verbose output during compilation"
Please send me the output without this.

author

Yes I installed the libraries

author

#include
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;
 }
}

author

Which program are you using??
Please send the code & have you installed all the libraries.
No need of this
"Show verbose output during compilation"
Please send me the output without this.

author

Which program are you using??
Please send the code & have you installed all the libraries.
No need of this
"Show verbose output during compilation"
Please send me the output without this.

author
Kamal rjn (author)2016-12-02

can you help me pls

author
Piyushgarg18 (author)2016-11-30

what is use of ultrasonic sensor in this project ?

author

Nothing special. It just use to measure distance between obstacles & robot.
In feature this can use for applying conditions of obstacles avoiding.

author

ok thanks

author
Piyushgarg18 (author)2016-11-30

and what thing you connect with phone using otg cable ?

author

I had not any regulated power supply for arduino therefore i had used otg to power up arduino & 12 v battery giving power to motors only.

author
Gouri shankar (author)2016-08-10

Arduino: 1.6.7 (Windows 7), Board: "Arduino/Genuino Uno"

C:\Users\user\Documents\Arduino\Bluetooth_robot_project\Bluetooth_robot_project.ino:113:2: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs]

??//get the result

^

C:\Users\user\Documents\Arduino\Bluetooth_robot_project\Bluetooth_robot_project.ino: In function 'void setup()':

Bluetooth_robot_project:33: error: expected primary-expression before '?' token

??pinMode(trig_pin, OUTPUT); ??pinMode(echo_pin, INPUT); ??digitalWrite(trig_pin, LOW);

^

Bluetooth_robot_project:33: error: expected primary-expression before '?' token

??pinMode(trig_pin, OUTPUT); ??pinMode(echo_pin, INPUT); ??digitalWrite(trig_pin, LOW);

^

Bluetooth_robot_project:33: error: expected ':' before ';' token

??pinMode(trig_pin, OUTPUT); ??pinMode(echo_pin, INPUT); ??digitalWrite(trig_pin, LOW);

^

Bluetooth_robot_project:33: error: expected primary-expression before ';' token

Bluetooth_robot_project:33: error: expected ':' before ';' token

Bluetooth_robot_project:33: error: expected primary-expression before ';' token

Bluetooth_robot_project:33: error: expected primary-expression before '?' token

??pinMode(trig_pin, OUTPUT); ??pinMode(echo_pin, INPUT); ??digitalWrite(trig_pin, LOW);

^

Bluetooth_robot_project:33: error: expected primary-expression before '?' token

??pinMode(trig_pin, OUTPUT); ??pinMode(echo_pin, INPUT); ??digitalWrite(trig_pin, LOW);

^

Bluetooth_robot_project:33: error: expected ':' before ';' token

??pinMode(trig_pin, OUTPUT); ??pinMode(echo_pin, INPUT); ??digitalWrite(trig_pin, LOW);

^

Bluetooth_robot_project:33: error: expected primary-expression before ';' token

Bluetooth_robot_project:33: error: expected ':' before ';' token

Bluetooth_robot_project:33: error: expected primary-expression before ';' token

Bluetooth_robot_project:33: error: expected primary-expression before '?' token

??pinMode(trig_pin, OUTPUT); ??pinMode(echo_pin, INPUT); ??digitalWrite(trig_pin, LOW);

^

Bluetooth_robot_project:33: error: expected primary-expression before '?' token

??pinMode(trig_pin, OUTPUT); ??pinMode(echo_pin, INPUT); ??digitalWrite(trig_pin, LOW);

^

Bluetooth_robot_project:33: error: expected ':' before ';' token

??pinMode(trig_pin, OUTPUT); ??pinMode(echo_pin, INPUT); ??digitalWrite(trig_pin, LOW);

^

Bluetooth_robot_project:33: error: expected primary-expression before ';' token

Bluetooth_robot_project:33: error: expected ':' before ';' token

Bluetooth_robot_project:33: error: expected primary-expression before ';' token

C:\Users\user\Documents\Arduino\Bluetooth_robot_project\Bluetooth_robot_project.ino: In function 'void loop()':

Bluetooth_robot_project:36: error: 'motor' was not declared in this scope

motor();

^

Bluetooth_robot_project:37: error: 'sensor' was not declared in this scope

sensor();

^

C:\Users\user\Documents\Arduino\Bluetooth_robot_project\Bluetooth_robot_project.ino: At global scope:

Bluetooth_robot_project:41: error: expected initializer before 'if'

if (Serial.available()){

^

exit status 1

expected primary-expression before '?' token

Invalid library found in C:\Program Files\Arduino\libraries\elapsedMillis-master: C:\Program Files\Arduino\libraries\elapsedMillis-master

Invalid library found in C:\Program Files\Arduino\libraries\elapsedMillis-master: C:\Program Files\Arduino\libraries\elapsedMillis-master

This report would have more information with

"Show verbose output during compilation"

enabled in File > Preferences.

author

Have you installed millis library??
I have provided millis library zip in instructables.

author
Gouri shankar (author)2016-08-10

When i try to upload this program i am facing error..

author
Gouri shankar (author)2016-08-10

#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;

??}

}

author
Gouri shankar (author)2016-08-10

I am seeing this error message while compiling what to do

author
Gouri shankar (author)2016-08-10

Hi

I am not able to open the program file.

Will you please send me the program as text to me.

author

#include
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;
 }
}

author
DhruvPower (author)2016-08-06

Where do you connect the phone which is there on the robot

author

I have used my phone to power supply arduino through OTG cable.
And motors are powered by 12v battery.

author
Advaengineeringa (author)2016-08-04

PLEASE... ANSWER MY QUESTION

I Just want to know how to program the android app

only the commands

eg

on/off buuton turn on sends G, turn off sends g

PLEASE SEND ME THE OTHERS that will be so helpful, I'M IN NEED

author

Try to import my panel.see the screenshots.past panel file to shown location.
Or Do reverse engineering
See the arduino problem and try to figure out which alphabet is assigned with which switch.
Sorry i am little bit busy.

author
Gouri shankar (author)2016-08-05

Will you please add the diagram of the circuit with a pcb????

author
Advaengineeringa (author)2016-08-03

I cannot copy your mypanel.kwl to bluetooth electronics. Can you please help me?

I would prefer a reply saying which sends what.

eg.

on/off button - turn on sends G, turn off sends g. (This is the only one I know)

Can you please send me the other commands?

Thanks, I Appreciate it.

author
AmilaJ3 (author)2016-08-02

Can we steer the robot without using rubber treads for the wheels?

author

Yes,we can steer robot without rubber belt.

author
Gouri shankar (author)2016-08-01

Where did you buy the tyres from????

author

From eBay

author
Gouri shankar (author)2016-08-01

RECTIFIERS ARE NOT PRESENT IN THE CIRCUIT?????
IF THEY ARE NOT REQUIRED PLEASE PROVIDE THE BATTERY SPECIFICATIONS???

author

This circuit runs on battery therefore doesn't required rectifier circuit.

author
Thisara Gamalath (author)2016-08-01

Thank you for answering my question that was very helpful.

I have another small question, CAN WE RUN THE ROBOT WITHOUT USING THE RUBBER BELTS FOR THE WHEELS?

author

Yes,you can use any other wheels

author

Yes,you can use any other wheels

author
Gouri shankar (author)2016-08-01

Then where is the rectifier???