Hi there! Recently I bought two HC-05 Bluetooth modules, and, when I connected them to my project (Arduino Bluetooth car) and tried to send commands from my phone, the delay for any command was really long (3-10 sec.) Need to say that the commands were arriving to the Arduino correctly (in echo in serial port are the same characters that i send, but with a long delay). Tried to change baud rate(from 9600) in both code and serial monitor, but, it still only works only on 9600 baud, on others it just arrives some strange characters.
So, I established AT commands mode and tried to discover what's going on. At commands were working properly on standard, 38400 baud. But, when I send AT+UART? It returns me... 4800,0,0. Really strange, as I read in forums, no one gets 4800 baud as a standard. And also, so why is it working on 9600 baud?! Anyways, I tried to change that with AT+UART=9600,0,0 it says ok, and when I ask another time AT+UART? I says 9600,0,0. Ok, problem solved? Nope, when I restart the whole system, and ask AT+UART? It says 4800,0,0. I can't change it to any baud rate (38400, 9600, 115200...). Has anyone got a similar problem? Should I just return the modules and buy some hc-06? And also, what can I do with the "delay" that's the only problem, if I fix that, I will no longer touch anything and just leave it working.
here is the code:
char t;
#define A1 2
#define A2 3
#define B1 4
#define B2 5
void setup() {
pinMode(A1,OUTPUT); //left motors forward
pinMode(B1,OUTPUT); //left motors reverse
pinMode(A2,OUTPUT); //right motors forward
pinMode(B2,OUTPUT); //right motors reverse
Serial.begin(4800);
}
void loop() {
if(Serial.available()){
t = Serial.read();
Serial.println(t);
}
if(t == 'F'){ //move forward(all motors rotate in forward direction)
digitalWrite(A1,HIGH);
digitalWrite(B1,HIGH);
}
else if(t == 'B'){ //move reverse (all motors rotate in reverse direction)
digitalWrite(B2,HIGH);
digitalWrite(A2,HIGH);
}
else if(t == 'L'){ //turn right (left side motors rotate in forward direction, right side motors doesn't rotate)
digitalWrite(B1,HIGH);
}
else if(t == 'R'){ //turn left (right side motors rotate in forward direction, left side motors doesn't rotate)
digitalWrite(A1,HIGH);
}
else if(t == 'S'){ //STOP (all motors stop)
digitalWrite(A1,LOW);
digitalWrite(B2,LOW);
digitalWrite(B1,LOW);
digitalWrite(A2,LOW);
}
delay(100);
}
Thanks for any help)!






