Bluetooth Controlled Robot


Description


                       Robots are crazy, is it right. What about making a robot which can be controlled by your smartphone, really cool.
 In this project, we are going to build a robot that can be controlled by Bluetooth technology from your smartphone. For this, you must install an application so that we can transmit commanding signals from the phone to the robot easily. use the given below link to download and install App.

Click the below link to download the app



Components Required

 1. Arduino UNO  * 1
 2. L298N Motor Driver Module  * 1
 3. Bluetooth Module(HC-05)  * 1
 4. Gear Motor  * 4
 5. Wheels   * 4
 6.  LED(Blue)    * 1
 7. Acrylic Sheet * 1
 8. 18650 Li-ion Battery   * 2
 9.  18650 Li-ion Battery Holder * 1
10. Jumper Wires  * 1
11. DC Power Switch  * 1

Circuit Diagram


Program
 
Complete your coding with the help of the Arduino ide. Upload program to your Arduino board makes sure that the Arduino port selection option is perfect. Avoid chance to get an error during uploading program to board

Click here to learn: "How to Upload your code to Arduino boards Without Error"

char t; 
void setup() {
pinMode(6,OUTPUT);   //left motors forward
pinMode(5,OUTPUT);   //left motors reverse
pinMode(11,OUTPUT);   //right motors forward
pinMode(10,OUTPUT);   //right motors reverse
pinMode(9,OUTPUT);   //Led
Serial.begin(9600);
 
}
 
void loop() {
 
if(Serial.available())
{
  t = Serial.read();
  Serial.println(t);
}
 
if(t == 'F')
{            //move forward(all motors rotate in forward direction)
  digitalWrite(6,HIGH);
  digitalWrite(11,HIGH);
}
 
else if(t == 'B')
{                                      //move reverse (all motors rotate in reverse direction)
  digitalWrite(5,HIGH);
  digitalWrite(10,HIGH);
}
 
else if(t == 'R')
{                  //turn right (left side motors rotate in forward direction, right side motors doesn't rotate)
  digitalWrite(11,HIGH);
}
 
else if(t == 'L')
{                        //turn left (right side motors rotate in forward direction, left side motors doesn't rotate)
  digitalWrite(6,HIGH);
}

else if(t == 'X')
{    //turn led on or off)
  digitalWrite(9,HIGH);
}
else if(t == 'Y')
{
  digitalWrite(9,LOW);
}
 
else if(t == 'S')
{                                                  //STOP (all motors stop)
  digitalWrite(6,LOW);
  digitalWrite(5,LOW);
  digitalWrite(11,LOW);
  digitalWrite(10,LOW);
}
}