Wireless Bluetooth Bot using Arduino and Bluetooth

In this tutorial we are going to learn how to make a wireless Bluetooth Bot using Arduino and Bluetooth module hc-05, and control it using our smartphone.

HC-05 Bluetooth Module

HC-05 Bluetooth Module | Alpha Electronz
HC-05 Bluetooth Module

The HC-05 Bluetooth Module is responsible for enabling Bluetooth Communication between Arduino and Android Phone.

For more information on HC-05 Bluetooth Module, refer to HC-05 Bluetooth Module

L298N Motor Drive Module

L298N Motor Drive Module | Alpha Electronz
L298N Motor Drive Module

The L298N Motor Driver Module is responsible for providing the necessary drive current to the motors of the robotic car.

Circuit Diagram

Wireless Bluetooth Bot using Arduino and HC-05 Bluetooth Module | Alpha Electronz
Wireless Bluetooth Bot Circuit Diagram

The following is the circuit diagram of Bluetooth Controlled Robot using Arduino, L298N and HC-05.

Component required :

Application

App for voice command control – Download

App for Button and Gesture Control – Download

Voice command app

You can set the voice command and what data to send at that voice command.

I’ve configured 5 voice commands,

Forward & Data = 1

Backward & Data = 2

Right & Data = 3

Left & Data = 4

Stop & Data = 5

Gesture and Button Control App

In this the data sent is fixed by the developer of the app.

Forward – FF

Backward – BB

Right – RR

Left – LL

Stop – SS

Code

 #include

 SoftwareSerial BT(7,6);
 String readdata;
  void setup()
  {
    BT.begin(9600);
    Serial.begin(9600);
    pinMode(8,OUTPUT);
    pinMode(9,OUTPUT);
    pinMode(10,OUTPUT);
    pinMode(11,OUTPUT);
  }
  void loop()
  {
     while(BT.available())
  {
    delay(9);
    char c = BT.read();
    readdata +=c;
    Serial.println(readdata);
    //delay(90);
  }


  if(readdata == "1" || readdata == "FF")
  {
    digitalWrite(8,HIGH);
    digitalWrite(9,LOW);
    digitalWrite(10,HIGH);
    digitalWrite(11,LOW);
    Serial.println("forward");
    delay(90);
   
  }

    if(readdata == "2"|| readdata == "BB")
  {
    digitalWrite(8,LOW);
    digitalWrite(9,HIGH);
    digitalWrite(10,LOW);
    digitalWrite(11,HIGH);
    Serial.println("BACK");
    delay(90);
  }

    if(readdata == "3"|| readdata == "RR")
  {
    digitalWrite(8,LOW);
    digitalWrite(9,HIGH);
    digitalWrite(10,HIGH);
    digitalWrite(11,LOW);
    Serial.println("Right");
    delay(90);
  }

     if(readdata == "4"|| readdata == "LL")
  {
    digitalWrite(8,HIGH);
    digitalWrite(9,LOW);
    digitalWrite(10,LOW);
    digitalWrite(11,HIGH);
    Serial.println("left");
    delay(90);
  }

    if(readdata == "0"|| readdata == "SS")
  {
    digitalWrite(8,LOW);
    digitalWrite(9,LOW);
    digitalWrite(10,LOW);
    digitalWrite(11,LOW);
       
    delay(90);
  }
readdata="";
   
  } 

Video

 

1+

2 thoughts on “Wireless Bluetooth Bot using Arduino and Bluetooth

  • 02/16/2020 at 4:44 PM
    Permalink

    Will it work for sure??
    Plse send ur WhatsApp number bro…

    0
    Reply
    • 02/16/2020 at 3:15 AM
      Permalink

      Yes it will work lot’s of people have made this Project after reading and watching the tutorial.

      You can contact us on Instagram – @alpha_electronz

      0
      Reply

Leave a Reply

Your e-mail address will not be published. Required fields are marked *