loading

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

<p>sir,here in #include &lt;elapsedmillis.h&gt; its showing error what should do</p>
How to upload program in aurdino uno
<p>how to connect mobile with arduino ?</p>
Did this also avoid obstacles
Can we use hc08 instead of hc05
I haven't hc08 .i don't know.<br>Try my code.if this works for hc08 late me know.
<p>ok</p><p> thanx for reply</p>
<p>help me</p>
<p>#include &lt;elapsedMillis.h&gt;<br>elapsedMillis timeElapsed;<br>char BluetoothData; // the Bluetooth data received<br>int switch1 = 11;<br>int switch2 = 12;<br>int trig_pin = 8;<br>int echo_pin = 9;<br>long echotime; //in micro seconds<br>float distance; //in cm<br>unsigned int interval = 100;<br><br>void setup() {<br><br>Serial.begin(9600);<br><br>//Set Digital Pins 4 to 7 as Output<br>pinMode(4,OUTPUT);<br>pinMode(5,OUTPUT);<br>pinMode(6,OUTPUT);<br>pinMode(7,OUTPUT);<br>pinMode(13,OUTPUT);<br>pinMode(12,OUTPUT);<br>pinMode(11,OUTPUT);<br>//Set State of Pins all to LOW (0)<br>digitalWrite(4,0);<br>digitalWrite(5,0);<br>digitalWrite(6,0);<br>digitalWrite(7,0);<br>digitalWrite(11,0);<br>digitalWrite(12,0);<br>digitalWrite(13,0);<br>Serial.begin (9600);<br>pinMode(trig_pin, OUTPUT);<br>pinMode(echo_pin, INPUT);<br>digitalWrite(trig_pin, LOW);<br>}<br>void loop() {<br>motor();<br>sensor();<br>}<br><br>void motor()<br>{<br>if (Serial.available()){<br>BluetoothData=Serial.read();<br>if(BluetoothData=='F'){ // Red Button Pressed<br>digitalWrite(4,1); //Turn diital out 4 to High<br>digitalWrite(5,0); //Turn digital out 5 to Low<br>digitalWrite(6,1);<br>digitalWrite(7,0);<br>}<br><br>if(BluetoothData=='B'){ // Yellow Button Pressed<br>digitalWrite(5,1);<br>digitalWrite(4,0);<br>digitalWrite(6,0);<br>digitalWrite(7,1);<br>}<br>if(BluetoothData=='f'||BluetoothData=='b'){ // Red or Yellow Button Released<br>digitalWrite(4,0);<br>digitalWrite(5,0);<br>digitalWrite(6,0);<br>digitalWrite(7,0);<br>}<br>if(BluetoothData=='L'){ // Green Button Pressed<br>digitalWrite(6,1);<br>digitalWrite(7,0);<br>digitalWrite(4,0);<br>digitalWrite(5,0);<br>}<br>if(BluetoothData=='R'){ // Blue Button Pressed<br>digitalWrite(4,1);<br>digitalWrite(5,0);<br>digitalWrite(7,0);<br>digitalWrite(6,0);<br><br>}<br>if(BluetoothData=='l'||BluetoothData=='r'){ // Green or Blue Button Released<br>digitalWrite(7,0);<br>digitalWrite(4,0);<br>digitalWrite(5,0);<br>digitalWrite(6,0);<br>}<br>if(BluetoothData=='G'){<br>digitalWrite(13,1);<br>}<br>if(BluetoothData=='g'){<br>digitalWrite(13,0);<br>}<br>if(BluetoothData=='P'){<br>digitalWrite(12,1);<br>}<br>if(BluetoothData=='X'){<br>digitalWrite(11,1);<br>Serial.print(&quot;*XR241G232B248&quot;);<br>}<br>if(BluetoothData=='x'){<br>digitalWrite(11,0);<br>Serial.print(&quot;*XR000G000B000&quot;);<br>}<br>if(BluetoothData=='p'){<br>digitalWrite(12,0);<br>}<br><br>delay(10);// wait 10 ms<br>}<br>}<br>void sensor()<br>{<br>if (timeElapsed &gt; interval)<br>{<br>digitalWrite(trig_pin, HIGH);<br>delayMicroseconds(10);<br>digitalWrite(trig_pin, LOW);<br>motor();<br>//get the result<br>echotime= pulseIn(echo_pin, HIGH);<br>distance= 0.0001*((float)echotime*340.0)/2.0;<br><br>Serial.print(&quot;*D&quot;+String(distance,1)+&quot;*&quot;);<br>timeElapsed = 0;<br>}<br>}<br><br>/*try this code. <br><br>i am also getting same error on arduino IDE 1.6.12.<br><br>which version of arduino IDE are you using??<br><br>use 1.6.5 version of arduino IDE*/</p>
<p>help me bro pls</p>
I think now problem is your arduino.please try to upload simple code like blinking LED and if you succeed then try my code.
<p>Arduino: 1.6.5 (Windows XP), Board: &quot;Arduino/Genuino Uno&quot;</p><p>Sketch uses 7,240 bytes (22%) of program storage space. Maximum is 32,256 bytes.</p><p>Global variables use 247 bytes (12%) of dynamic memory, leaving 1,801 bytes for local variables. Maximum is 2,048 bytes.</p><p>avrdude: stk500_recv(): programmer is not responding</p><p>avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x60</p><p>avrdude: stk500_recv(): programmer is not responding</p><p>avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x60</p><p>avrdude: stk500_recv(): programmer is not responding</p><p>avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x60</p><p>avrdude: stk500_recv(): programmer is not responding</p><p>avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x60</p><p>avrdude: stk500_recv(): programmer is not responding</p><p>avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x60</p><p>avrdude: stk500_recv(): programmer is not responding</p><p>avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x60</p><p>avrdude: stk500_recv(): programmer is not responding</p><p>avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x60</p><p>avrdude: stk500_recv(): programmer is not responding</p><p>avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x60</p><p>avrdude: stk500_recv(): programmer is not responding</p><p>avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x60</p><p>avrdude: stk500_recv(): programmer is not responding</p><p>avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x60</p><p>Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.</p><p> This report would have more information with</p><p> &quot;Show verbose output during compilation&quot;</p><p> enabled in File &gt; Preferences.</p>
are you able to compile the code ??<br>i think now the issue is due to the drivers or your arduino is not working properly.<br>install drivers properly .
<p>hi pls help me...i need to sumit the project on monday...pls help me</p>
<p>Arduino: 1.6.13 (Windows XP), Board: &quot;Arduino/Genuino Uno&quot;</p><p>FHOJVNTIPH4TE74:33: error: stray '\302' in program</p><p> &Acirc; pinMode(trig_pin, OUTPUT); </p><p> ^</p><p>FHOJVNTIPH4TE74:33: error: stray '\240' in program</p><p>FHOJVNTIPH4TE74:34: error: stray '\302' in program</p><p> &Acirc; pinMode(echo_pin, INPUT);</p><p> ^</p><p>FHOJVNTIPH4TE74:34: error: stray '\240' in program</p><p>FHOJVNTIPH4TE74:35: error: stray '\302' in program</p><p> &Acirc; digitalWrite(trig_pin, LOW);</p><p> ^</p><p>FHOJVNTIPH4TE74:35: error: stray '\240' in program</p><p>FHOJVNTIPH4TE74:43: error: stray '\302' in program</p><p> {&Acirc; </p><p> ^</p><p>FHOJVNTIPH4TE74:43: error: stray '\240' in program</p><p>FHOJVNTIPH4TE74:107: error: stray '\302' in program</p><p> } &Acirc; </p><p> ^</p><p>FHOJVNTIPH4TE74:107: error: stray '\240' in program</p><p>FHOJVNTIPH4TE74:113: error: stray '\302' in program</p><p> &Acirc; delayMicroseconds(10);</p><p> ^</p><p>FHOJVNTIPH4TE74:113: error: stray '\240' in program</p><p>FHOJVNTIPH4TE74:114: error: stray '\302' in program</p><p> &Acirc; digitalWrite(trig_pin, LOW);</p><p> ^</p><p>FHOJVNTIPH4TE74:114: error: stray '\240' in program</p><p>FHOJVNTIPH4TE74:116: error: stray '\302' in program</p><p> &Acirc; //get the result</p><p> ^</p><p>FHOJVNTIPH4TE74:116: error: stray '\240' in program</p><p>FHOJVNTIPH4TE74:117: error: stray '\302' in program</p><p> &Acirc; echotime= pulseIn(echo_pin, HIGH);</p><p> ^</p><p>FHOJVNTIPH4TE74:117: error: stray '\240' in program</p><p>FHOJVNTIPH4TE74:118: error: stray '\302' in program</p><p> &Acirc; distance= 0.0001*((float)echotime*340.0)/2.0;</p><p> ^</p><p>FHOJVNTIPH4TE74:118: error: stray '\240' in program</p><p>FHOJVNTIPH4TE74:119: error: stray '\302' in program</p><p> &Acirc; </p><p> ^</p><p>FHOJVNTIPH4TE74:119: error: stray '\240' in program</p><p>FHOJVNTIPH4TE74:120: error: stray '\302' in program</p><p> &Acirc; Serial.print(&quot;*D&quot;+String(distance,1)+&quot;*&quot;);</p><p> ^</p><p>FHOJVNTIPH4TE74:120: error: stray '\240' in program</p><p>FHOJVNTIPH4TE74:121: error: stray '\302' in program</p><p> &Acirc; timeElapsed = 0;</p><p> ^</p><p>FHOJVNTIPH4TE74:121: error: stray '\240' in program</p><p>exit status 1</p><p>stray '\302' in program</p><p>This report would have more information with</p><p>&quot;Show verbose output during compilation&quot;</p><p>option enabled in File -&gt; Preferences.</p>
Which program are you using??<br>Please send the code &amp; have you installed all the libraries.<br>No need of this<br>&quot;Show verbose output during compilation&quot;<br>Please send me the output without this.<br>
Yes I installed the libraries
#include <br>elapsedMillis timeElapsed;<br>char BluetoothData; // the Bluetooth data received <br>int switch1 = 11;<br>int switch2 = 12;<br>int trig_pin = 8;<br>int echo_pin = 9;<br>long echotime; //in micro seconds<br>float distance; //in cm<br>unsigned int interval = 100;<br><br>void setup() {<br><br> Serial.begin(9600);<br> <br> //Set Digital Pins 4 to 7 as Output<br> pinMode(4,OUTPUT);<br> pinMode(5,OUTPUT);<br> pinMode(6,OUTPUT);<br> pinMode(7,OUTPUT);<br> pinMode(13,OUTPUT);<br> pinMode(12,OUTPUT);<br> pinMode(11,OUTPUT);<br> //Set State of Pins all to LOW (0)<br> digitalWrite(4,0);<br> digitalWrite(5,0);<br> digitalWrite(6,0);<br> digitalWrite(7,0);<br> digitalWrite(11,0);<br> digitalWrite(12,0);<br> digitalWrite(13,0);<br> Serial.begin (9600);<br> &Acirc; pinMode(trig_pin, OUTPUT); <br> &Acirc; pinMode(echo_pin, INPUT);<br> &Acirc; digitalWrite(trig_pin, LOW);<br>}<br>void loop() {<br>motor();<br>sensor();<br>} <br> <br>void motor()<br>{&Acirc; <br>if (Serial.available()){ <br> BluetoothData=Serial.read();<br>if(BluetoothData=='F'){ // Red Button Pressed<br> digitalWrite(4,1); //Turn diital out 4 to High<br> digitalWrite(5,0); //Turn digital out 5 to Low<br> digitalWrite(6,1);<br> digitalWrite(7,0);<br> }<br><br> if(BluetoothData=='B'){ // Yellow Button Pressed<br> digitalWrite(5,1);<br> digitalWrite(4,0);<br> digitalWrite(6,0);<br> digitalWrite(7,1);<br> }<br> if(BluetoothData=='f'||BluetoothData=='b'){ // Red or Yellow Button Released<br> digitalWrite(4,0);<br> digitalWrite(5,0);<br> digitalWrite(6,0);<br> digitalWrite(7,0);<br> }<br> if(BluetoothData=='L'){ // Green Button Pressed<br> digitalWrite(6,1);<br> digitalWrite(7,0);<br> digitalWrite(4,0);<br> digitalWrite(5,0);<br> }<br> if(BluetoothData=='R'){ // Blue Button Pressed<br> digitalWrite(4,1);<br> digitalWrite(5,0);<br> digitalWrite(7,0);<br> digitalWrite(6,0);<br> <br> }<br> if(BluetoothData=='l'||BluetoothData=='r'){ // Green or Blue Button Released<br> digitalWrite(7,0);<br> digitalWrite(4,0);<br> digitalWrite(5,0);<br> digitalWrite(6,0);<br> }<br> if(BluetoothData=='G'){<br> digitalWrite(13,1);<br> }<br> if(BluetoothData=='g'){<br> digitalWrite(13,0);<br> }<br> if(BluetoothData=='P'){<br> digitalWrite(12,1);<br> }<br>if(BluetoothData=='X'){<br> digitalWrite(11,1);<br> Serial.print(&quot;*XR241G232B248&quot;);<br> }<br> if(BluetoothData=='x'){<br> digitalWrite(11,0);<br> Serial.print(&quot;*XR000G000B000&quot;); <br> }<br> if(BluetoothData=='p'){<br> digitalWrite(12,0);<br> }<br> <br> delay(10);// wait 10 ms<br>} <br>} &Acirc; <br>void sensor()<br>{<br> if (timeElapsed &gt; interval) <br> { <br> digitalWrite(trig_pin, HIGH);<br> &Acirc; delayMicroseconds(10);<br> &Acirc; digitalWrite(trig_pin, LOW);<br>motor();<br> &Acirc; //get the result<br> &Acirc; echotime= pulseIn(echo_pin, HIGH);<br> &Acirc; distance= 0.0001*((float)echotime*340.0)/2.0;<br> &Acirc; <br> &Acirc; Serial.print(&quot;*D&quot;+String(distance,1)+&quot;*&quot;);<br> &Acirc; timeElapsed = 0;<br> &Acirc; }<br>}
Which program are you using??<br>Please send the code &amp; have you installed all the libraries.<br>No need of this<br>&quot;Show verbose output during compilation&quot;<br>Please send me the output without this.<br>
Which program are you using??<br>Please send the code &amp; have you installed all the libraries.<br>No need of this<br>&quot;Show verbose output during compilation&quot;<br>Please send me the output without this.<br>
<p>can you help me pls</p>
what is use of ultrasonic sensor in this project ?
Nothing special. It just use to measure distance between obstacles &amp; robot.<br>In feature this can use for applying conditions of obstacles avoiding.
ok thanks
and what thing you connect with phone using otg cable ?
I had not any regulated power supply for arduino therefore i had used otg to power up arduino &amp; 12 v battery giving power to motors only.
<p>Arduino: 1.6.7 (Windows 7), Board: &quot;Arduino/Genuino Uno&quot;</p><p>C:\Users\user\Documents\Arduino\Bluetooth_robot_project\Bluetooth_robot_project.ino:113:2: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs]</p><p> ??//get the result</p><p> ^</p><p>C:\Users\user\Documents\Arduino\Bluetooth_robot_project\Bluetooth_robot_project.ino: In function 'void setup()':</p><p>Bluetooth_robot_project:33: error: expected primary-expression before '?' token</p><p> ??pinMode(trig_pin, OUTPUT); ??pinMode(echo_pin, INPUT); ??digitalWrite(trig_pin, LOW);</p><p> ^</p><p>Bluetooth_robot_project:33: error: expected primary-expression before '?' token</p><p> ??pinMode(trig_pin, OUTPUT); ??pinMode(echo_pin, INPUT); ??digitalWrite(trig_pin, LOW);</p><p> ^</p><p>Bluetooth_robot_project:33: error: expected ':' before ';' token</p><p> ??pinMode(trig_pin, OUTPUT); ??pinMode(echo_pin, INPUT); ??digitalWrite(trig_pin, LOW);</p><p> ^</p><p>Bluetooth_robot_project:33: error: expected primary-expression before ';' token</p><p>Bluetooth_robot_project:33: error: expected ':' before ';' token</p><p>Bluetooth_robot_project:33: error: expected primary-expression before ';' token</p><p>Bluetooth_robot_project:33: error: expected primary-expression before '?' token</p><p> ??pinMode(trig_pin, OUTPUT); ??pinMode(echo_pin, INPUT); ??digitalWrite(trig_pin, LOW);</p><p> ^</p><p>Bluetooth_robot_project:33: error: expected primary-expression before '?' token</p><p> ??pinMode(trig_pin, OUTPUT); ??pinMode(echo_pin, INPUT); ??digitalWrite(trig_pin, LOW);</p><p> ^</p><p>Bluetooth_robot_project:33: error: expected ':' before ';' token</p><p> ??pinMode(trig_pin, OUTPUT); ??pinMode(echo_pin, INPUT); ??digitalWrite(trig_pin, LOW);</p><p> ^</p><p>Bluetooth_robot_project:33: error: expected primary-expression before ';' token</p><p>Bluetooth_robot_project:33: error: expected ':' before ';' token</p><p>Bluetooth_robot_project:33: error: expected primary-expression before ';' token</p><p>Bluetooth_robot_project:33: error: expected primary-expression before '?' token</p><p> ??pinMode(trig_pin, OUTPUT); ??pinMode(echo_pin, INPUT); ??digitalWrite(trig_pin, LOW);</p><p> ^</p><p>Bluetooth_robot_project:33: error: expected primary-expression before '?' token</p><p> ??pinMode(trig_pin, OUTPUT); ??pinMode(echo_pin, INPUT); ??digitalWrite(trig_pin, LOW);</p><p> ^</p><p>Bluetooth_robot_project:33: error: expected ':' before ';' token</p><p> ??pinMode(trig_pin, OUTPUT); ??pinMode(echo_pin, INPUT); ??digitalWrite(trig_pin, LOW);</p><p> ^</p><p>Bluetooth_robot_project:33: error: expected primary-expression before ';' token</p><p>Bluetooth_robot_project:33: error: expected ':' before ';' token</p><p>Bluetooth_robot_project:33: error: expected primary-expression before ';' token</p><p>C:\Users\user\Documents\Arduino\Bluetooth_robot_project\Bluetooth_robot_project.ino: In function 'void loop()':</p><p>Bluetooth_robot_project:36: error: 'motor' was not declared in this scope</p><p> motor();</p><p> ^</p><p>Bluetooth_robot_project:37: error: 'sensor' was not declared in this scope</p><p> sensor();</p><p> ^</p><p>C:\Users\user\Documents\Arduino\Bluetooth_robot_project\Bluetooth_robot_project.ino: At global scope:</p><p>Bluetooth_robot_project:41: error: expected initializer before 'if'</p><p> if (Serial.available()){ </p><p> ^</p><p>exit status 1</p><p>expected primary-expression before '?' token</p><p>Invalid library found in C:\Program Files\Arduino\libraries\elapsedMillis-master: C:\Program Files\Arduino\libraries\elapsedMillis-master</p><p>Invalid library found in C:\Program Files\Arduino\libraries\elapsedMillis-master: C:\Program Files\Arduino\libraries\elapsedMillis-master</p><p> This report would have more information with</p><p> &quot;Show verbose output during compilation&quot;</p><p> enabled in File &gt; Preferences.</p>
Have you installed millis library??<br>I have provided millis library zip in instructables.
<p>When i try to upload this program i am facing error..</p>
<p>#include &lt;elapsedMillis.h&gt;</p><p>elapsedMillis timeElapsed;</p><p>char BluetoothData; // the Bluetooth data received </p><p>int switch1 = 11;</p><p>int switch2 = 12;</p><p>int trig_pin = 8;</p><p>int echo_pin = 9;</p><p>long echotime; //in micro seconds</p><p>float distance; //in cm</p><p>unsigned int interval = 100;</p><p>void setup() {</p><p> Serial.begin(9600);</p><p> //Set Digital Pins 4 to 7 as Output</p><p> pinMode(4,OUTPUT);</p><p> pinMode(5,OUTPUT);</p><p> pinMode(6,OUTPUT);</p><p> pinMode(7,OUTPUT);</p><p> pinMode(13,OUTPUT);</p><p> pinMode(12,OUTPUT);</p><p> pinMode(11,OUTPUT);</p><p> //Set State of Pins all to LOW (0)</p><p> digitalWrite(4,0);</p><p> digitalWrite(5,0);</p><p> digitalWrite(6,0);</p><p> digitalWrite(7,0);</p><p> digitalWrite(11,0);</p><p> digitalWrite(12,0);</p><p> digitalWrite(13,0);</p><p> Serial.begin (9600);</p><p> ??pinMode(trig_pin, OUTPUT); </p><p> ??pinMode(echo_pin, INPUT);</p><p> ??digitalWrite(trig_pin, LOW);</p><p>}</p><p>void loop() {</p><p>motor();</p><p>sensor();</p><p>} </p><p>void motor()</p><p>{??</p><p>if (Serial.available()){ </p><p> BluetoothData=Serial.read();</p><p>if(BluetoothData=='F'){ // Red Button Pressed</p><p> digitalWrite(4,1); //Turn diital out 4 to High</p><p> digitalWrite(5,0); //Turn digital out 5 to Low</p><p> digitalWrite(6,1);</p><p> digitalWrite(7,0);</p><p> }</p><p> if(BluetoothData=='B'){ // Yellow Button Pressed</p><p> digitalWrite(5,1);</p><p> digitalWrite(4,0);</p><p> digitalWrite(6,0);</p><p> digitalWrite(7,1);</p><p> }</p><p> if(BluetoothData=='f'||BluetoothData=='b'){ // Red or Yellow Button Released</p><p> digitalWrite(4,0);</p><p> digitalWrite(5,0);</p><p> digitalWrite(6,0);</p><p> digitalWrite(7,0);</p><p> }</p><p> if(BluetoothData=='L'){ // Green Button Pressed</p><p> digitalWrite(6,1);</p><p> digitalWrite(7,0);</p><p> digitalWrite(4,0);</p><p> digitalWrite(5,0);</p><p> }</p><p> if(BluetoothData=='R'){ // Blue Button Pressed</p><p> digitalWrite(4,1);</p><p> digitalWrite(5,0);</p><p> digitalWrite(7,0);</p><p> digitalWrite(6,0);</p><p> }</p><p> if(BluetoothData=='l'||BluetoothData=='r'){ // Green or Blue Button Released</p><p> digitalWrite(7,0);</p><p> digitalWrite(4,0);</p><p> digitalWrite(5,0);</p><p> digitalWrite(6,0);</p><p> }</p><p> if(BluetoothData=='G'){</p><p> digitalWrite(13,1);</p><p> }</p><p> if(BluetoothData=='g'){</p><p> digitalWrite(13,0);</p><p> }</p><p> if(BluetoothData=='P'){</p><p> digitalWrite(12,1);</p><p> }</p><p>if(BluetoothData=='X'){</p><p> digitalWrite(11,1);</p><p> Serial.print(&quot;*XR241G232B248&quot;);</p><p> }</p><p> if(BluetoothData=='x'){</p><p> digitalWrite(11,0);</p><p> Serial.print(&quot;*XR000G000B000&quot;); </p><p> }</p><p> if(BluetoothData=='p'){</p><p> digitalWrite(12,0);</p><p> }</p><p> delay(10);// wait 10 ms</p><p>} </p><p>} ??</p><p>void sensor()</p><p>{</p><p> if (timeElapsed &gt; interval) </p><p> { </p><p> digitalWrite(trig_pin, HIGH);</p><p> ??delayMicroseconds(10);</p><p> ??digitalWrite(trig_pin, LOW);</p><p>motor();</p><p> ??//get the result</p><p> ??echotime= pulseIn(echo_pin, HIGH);</p><p> ??distance= 0.0001*((float)echotime*340.0)/2.0;</p><p> ??</p><p> ??Serial.print(&quot;*D&quot;+String(distance,1)+&quot;*&quot;);</p><p> ??timeElapsed = 0;</p><p> ??}</p><p>}</p>
<p>I am seeing this error message while compiling what to do</p>
<p>Hi</p><p>I am not able to open the program file.</p><p>Will you please send me the program as text to me.</p>
#include <br>elapsedMillis timeElapsed;<br>char BluetoothData; // the Bluetooth data received <br>int switch1 = 11;<br>int switch2 = 12;<br>int trig_pin = 8;<br>int echo_pin = 9;<br>long echotime; //in micro seconds<br>float distance; //in cm<br>unsigned int interval = 100;<br><br>void setup() {<br><br> Serial.begin(9600);<br> <br> //Set Digital Pins 4 to 7 as Output<br> pinMode(4,OUTPUT);<br> pinMode(5,OUTPUT);<br> pinMode(6,OUTPUT);<br> pinMode(7,OUTPUT);<br> pinMode(13,OUTPUT);<br> pinMode(12,OUTPUT);<br> pinMode(11,OUTPUT);<br> //Set State of Pins all to LOW (0)<br> digitalWrite(4,0);<br> digitalWrite(5,0);<br> digitalWrite(6,0);<br> digitalWrite(7,0);<br> digitalWrite(11,0);<br> digitalWrite(12,0);<br> digitalWrite(13,0);<br> Serial.begin (9600);<br> &nbsp;pinMode(trig_pin, OUTPUT); <br> &nbsp;pinMode(echo_pin, INPUT);<br> &nbsp;digitalWrite(trig_pin, LOW);<br>}<br>void loop() {<br>motor();<br>sensor();<br>} <br> <br>void motor()<br>{&nbsp;<br>if (Serial.available()){ <br> BluetoothData=Serial.read();<br>if(BluetoothData=='F'){ // Red Button Pressed<br> digitalWrite(4,1); //Turn diital out 4 to High<br> digitalWrite(5,0); //Turn digital out 5 to Low<br> digitalWrite(6,1);<br> digitalWrite(7,0);<br> }<br><br> if(BluetoothData=='B'){ // Yellow Button Pressed<br> digitalWrite(5,1);<br> digitalWrite(4,0);<br> digitalWrite(6,0);<br> digitalWrite(7,1);<br> }<br> if(BluetoothData=='f'||BluetoothData=='b'){ // Red or Yellow Button Released<br> digitalWrite(4,0);<br> digitalWrite(5,0);<br> digitalWrite(6,0);<br> digitalWrite(7,0);<br> }<br> if(BluetoothData=='L'){ // Green Button Pressed<br> digitalWrite(6,1);<br> digitalWrite(7,0);<br> digitalWrite(4,0);<br> digitalWrite(5,0);<br> }<br> if(BluetoothData=='R'){ // Blue Button Pressed<br> digitalWrite(4,1);<br> digitalWrite(5,0);<br> digitalWrite(7,0);<br> digitalWrite(6,0);<br> <br> }<br> if(BluetoothData=='l'||BluetoothData=='r'){ // Green or Blue Button Released<br> digitalWrite(7,0);<br> digitalWrite(4,0);<br> digitalWrite(5,0);<br> digitalWrite(6,0);<br> }<br> if(BluetoothData=='G'){<br> digitalWrite(13,1);<br> }<br> if(BluetoothData=='g'){<br> digitalWrite(13,0);<br> }<br> if(BluetoothData=='P'){<br> digitalWrite(12,1);<br> }<br>if(BluetoothData=='X'){<br> digitalWrite(11,1);<br> Serial.print(&quot;*XR241G232B248&quot;);<br> }<br> if(BluetoothData=='x'){<br> digitalWrite(11,0);<br> Serial.print(&quot;*XR000G000B000&quot;); <br> }<br> if(BluetoothData=='p'){<br> digitalWrite(12,0);<br> }<br> <br> delay(10);// wait 10 ms<br>} <br>} &nbsp;<br>void sensor()<br>{<br> if (timeElapsed &gt; interval) <br> { <br> digitalWrite(trig_pin, HIGH);<br> &nbsp;delayMicroseconds(10);<br> &nbsp;digitalWrite(trig_pin, LOW);<br>motor();<br> &nbsp;//get the result<br> &nbsp;echotime= pulseIn(echo_pin, HIGH);<br> &nbsp;distance= 0.0001*((float)echotime*340.0)/2.0;<br> &nbsp;<br> &nbsp;Serial.print(&quot;*D&quot;+String(distance,1)+&quot;*&quot;);<br> &nbsp;timeElapsed = 0;<br> &nbsp;}<br>}<br><br>
<p>Where do you connect the phone which is there on the robot</p>
I have used my phone to power supply arduino through OTG cable.<br>And motors are powered by 12v battery.
<p>PLEASE... ANSWER MY QUESTION</p><p>I Just want to know how to program the android app</p><p>only the commands</p><p>eg</p><p>on/off buuton turn on sends G, turn off sends g</p><p>PLEASE SEND ME THE OTHERS that will be so helpful, I'M IN NEED </p>
Ss
Try to import my panel.see the screenshots.past panel file to shown location.<br>Or Do reverse engineering <br>See the arduino problem and try to figure out which alphabet is assigned with which switch.<br>Sorry i am little bit busy.
<p>Will you please add the diagram of the circuit with a pcb????</p>
<p>I cannot copy your mypanel.kwl to bluetooth electronics. Can you please help me?</p><p>I would prefer a reply saying which sends what.</p><p>eg.</p><p>on/off button - turn on sends G, turn off sends g. (This is the only one I know)</p><p>Can you please send me the other commands?</p><p>Thanks, I Appreciate it. </p>
<p>Can we steer the robot without using rubber treads for the wheels?</p>
Yes,we can steer robot without rubber belt.
<p>Where did you buy the tyres from????</p>
From eBay
<p>RECTIFIERS ARE NOT PRESENT IN THE CIRCUIT?????<br>IF THEY ARE NOT REQUIRED PLEASE PROVIDE THE BATTERY SPECIFICATIONS???<br></p>
This circuit runs on battery therefore doesn't required rectifier circuit.<br>
<p>Thank you for answering my question that was very helpful. </p><p>I have another small question, CAN WE RUN THE ROBOT WITHOUT USING THE RUBBER BELTS FOR THE WHEELS? </p>
Yes,you can use any other wheels
Yes,you can use any other wheels
<p>Then where is the rectifier???</p>

About This Instructable

9,229views

141favorites

License:

More by Saurabh Gangamwar47: Communication Between Raspberry Pi and Arduino Via Usb #firmata #python DIY Buck Converter Twoway Switching  
Add instructable to: