Control Arduino Remote Car Using Smart Phone

on Sunday, November 5, 2017



Hello every one,

         Today we are going to see the project arduino based remote car with smart phone control.
In this project we are going to control the arduino based remote car using our android phone. In this we are using an android app to communicate with our remote car via Bluetooth communication.

BT  Car Remote app:
App Download link

This is the circuit diagram of the project:



This is the arduino code of the project:

// INITIALIZE THE ARDUINO PINS
int m1 = 5;
int m2 = 6;
int m3 = 10;
int m4 = 11;

int led = 13;
void setup() {
 Serial.begin(9600);  // START SERIAL COMMUNICATION
 // DECLARE THE OUTPUT PINS
 pinMode(m1,OUTPUT);
 pinMode(m2,OUTPUT);
 pinMode(m3,OUTPUT);
 pinMode(m4,OUTPUT);
 pinMode(led,OUTPUT);
  // INITIAL VALUE FOR LED PIN
 digitalWrite(led,LOW);
}

void loop() {
  if(Serial.available())  // CHECK SERIAL VALUE AVAILABLE
  {
    String value = Serial.readStringUntil('\n'); // READ THE SERIAL VALUE
    Serial.println(value);
     if(value == "F") // CAR MOVES FORWARD
    {
       Serial.println("Forward");
       digitalWrite(led,HIGH);
       digitalWrite(m1,LOW);
       digitalWrite(m2,HIGH);
       digitalWrite(m3,LOW);
       digitalWrite(m4,LOW);
    }else if(value == "L") // CAR MOVES LEFT
    {
      Serial.println("Left");
      digitalWrite(led,HIGH);
      digitalWrite(m1,LOW);
      digitalWrite(m2,HIGH);
      digitalWrite(m3,LOW);
      digitalWrite(m4,HIGH);
    }
    else if(value == "R")  // CAR MOVES RIGHT
    {
       Serial.println("Right");
       digitalWrite(led,HIGH);
       digitalWrite(m1,LOW);
       digitalWrite(m2,HIGH);
       digitalWrite(m3,HIGH);
       digitalWrite(m4,LOW);
    }else if(value == "B") // CAR MOVES REVERSE
    {
       Serial.println("Reverse");
       digitalWrite(led,HIGH);
       digitalWrite(m1,HIGH);
       digitalWrite(m2,LOW);
       digitalWrite(m3,LOW);
       digitalWrite(m4,LOW);
    }else if(value == "A") // CAR MOVES REVERSE LEFT
    {
      Serial.println("Reverse Left");
      digitalWrite(led,HIGH);
      digitalWrite(m1,HIGH);
      digitalWrite(m2,LOW);
      digitalWrite(m3,HIGH);
      digitalWrite(m4,LOW);
    }else if(value == "C") // CAR MOVES REVERSE RIGHT
    {
      Serial.println("Reverse Right");
      digitalWrite(led,HIGH);
      digitalWrite(m1,HIGH);
      digitalWrite(m2,LOW);
      digitalWrite(m3,LOW);
      digitalWrite(m4,HIGH);
    }else if(value == "S")  // CAR STOPS
    {
      Serial.println("Stop");
      digitalWrite(led,LOW);
      digitalWrite(m1,LOW);
      digitalWrite(m2,LOW);
      digitalWrite(m3,LOW);
      digitalWrite(m4,LOW);
    }
   
  }
 

}
 







                                                   Thank you for reading