Rc car Bluetooth control and manual control

I want to control rc car in two operations control like Bluetooth control & manual. In this function i am using two (motors1 for forward and reverse),(motor2 for left and right)
Requirements
Bluetooth control :
*control motor1(forward & reverse)
*control motor2(left & right)
Manual control :
*control motor1(forward & reverse)
*motor2 no need

Problem
After adding the code for manual control. my bluetooth control also not working only left & right Working

ride_on_car_project_1.ino (2.68 KB)

Hi Dhanavignesh,

I have made a few adjustments to your code.

I am not sure if it will work but please give it a go!

/*
 * Created by Surajit Majumdar//12-07-2017
 * Project: Bluetooth Control Car
 */
 
 int outPin1 = 5;     //motor1
 int outPin2 = 6;    //motor1

 int outPin3 = 10;   //motor2
 int outPin4 = 11;   //motor2

 int switchPin1 = 2;
 int switchPin2 = 3;

 char bt = 0;       //BT 
 

 void setup()
 {
   Serial.begin(9600);
   
   pinMode(switchPin1,INPUT);
   pinMode(switchPin2,INPUT);
   pinMode(outPin1,OUTPUT);
   pinMode(outPin2,OUTPUT);
   pinMode(outPin3,OUTPUT);
   pinMode(outPin4,OUTPUT);
   
 }
 void loop()
 {
   
  
      if(digitalRead(switchPin1=HIGH));
     {
       digitalWrite(outPin1,HIGH);
       digitalWrite(outPin2,LOW);
        }
      if(digitalRead(switchPin2=HIGH));
     {
       digitalWrite(outPin1,LOW);
       digitalWrite(outPin2,HIGH);
    }
    if(digitalRead(bt)==LOW){
    bt = 'S';
    }
    
    
   if (Serial.available() > 0) //save incoming data to variable 'bt'
   {
     bt = Serial.read();

   
     if(bt == 'F')           //move forwards
     {
       digitalWrite(outPin1,HIGH);
       digitalWrite(outPin2,LOW);
       digitalWrite(outPin3,LOW);
       digitalWrite(outPin4,LOW);
     }
     if (bt == 'B')      //move backwards
     {
       digitalWrite(outPin1,LOW);
       digitalWrite(outPin2,HIGH);
       digitalWrite(outPin3,LOW);
       digitalWrite(outPin4,LOW);
     }
     if (bt == 'S')     //stop!!
     {   
       digitalWrite(outPin1,LOW);
       digitalWrite(outPin2,LOW);
       digitalWrite(outPin3,LOW);
       digitalWrite(outPin4,LOW);
     }
     if (bt == 'R')    // turn wheels right
     {
       digitalWrite(outPin3,LOW);
       digitalWrite(outPin4,HIGH);
       digitalWrite(outPin1,LOW);
       digitalWrite(outPin2,LOW);
     }
     if (bt == 'L')     //turn wheels left
     {
       digitalWrite(outPin3,HIGH);
       digitalWrite(outPin4,LOW);
       digitalWrite(outPin1,LOW);
       digitalWrite(outPin2,LOW);
     }
     if (bt== 'G')      //move forward left
     {
      digitalWrite(outPin1,HIGH);
      digitalWrite(outPin2,LOW);
      digitalWrite(outPin3,HIGH);
      digitalWrite(outPin4,LOW);
     }
     if (bt== 'I')      //move forward right
     {
      digitalWrite(outPin1,HIGH);
      digitalWrite(outPin2,LOW);
      digitalWrite(outPin3,LOW);
      digitalWrite(outPin4,HIGH);
     }
     if (bt== 'H')      //move backward left
     {
      digitalWrite(outPin1,LOW);
      digitalWrite(outPin2,HIGH);
      digitalWrite(outPin3,HIGH);
      digitalWrite(outPin4,LOW);
     }
     if (bt=='J')       //move backward right
     {
      digitalWrite(outPin1,LOW);
      digitalWrite(outPin2,HIGH);
      digitalWrite(outPin3,LOW);
      digitalWrite(outPin4,HIGH);
     }
  
    }
           
   }

Thanks,

Zeb