HC-05 is connected but command is not working

I am making a bluetooth car. When i connected HC-05 to the car, it blinks fast. When HC-05 is connected with the mobile phone, it blinks with pause but the buttons on mobile phone does not operate the car however, TX light flickers on the Arduino UNO.
When connected with USB in the serial monitor when i command 'F', the car works, the car responds and both RX and TX light flickers when command is given.

Can anyone Help. So far a couple of people have tried to help but no progress.

char t;

void setup() {
pinMode(13,OUTPUT); //left motors forward
pinMode(12,OUTPUT); //left motors reverse
pinMode(11,OUTPUT); //right motors forward
pinMode(10,OUTPUT); //right motors reverse
Serial.begin(9600);

}

void loop() {
if(Serial.available()){
t = Serial.read();
Serial.println(t);
}

Serial.print(t);

if(t == 'F'){ //move forward(all motors rotate in forward direction)
digitalWrite(13,HIGH);
digitalWrite(11,HIGH);
}

else if(t == 'B'){ //move reverse (all motors rotate in reverse direction)
digitalWrite(12,HIGH);
digitalWrite(10,HIGH);
}

else if(t == 'L'){ //turn right (left side motors rotate in forward direction, right side motors doesn't rotate)
digitalWrite(11,HIGH);
}

else if(t == 'R'){ //turn left (right side motors rotate in forward direction, left side motors doesn't rotate)
digitalWrite(13,HIGH);
}

else if(t == 'S'){ //STOP (all motors stop)
digitalWrite(13,LOW);
digitalWrite(12,LOW);
digitalWrite(11,LOW);
digitalWrite(10,LOW);
}
delay(100);
}

We can't see your code or your schematic.

Help is going to be . . . challenging.

Sorry. I have uploaded the code.

and the schematic for the sketch is still missing.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.