int leftmotorForward=A3;
int leftmotorBackward=A0;
int rightmotorForward=A1;
int rightmotorBackward=A2;
char data=0;
void setup() {
Serial.begin(9600);
if (voice.length() > 0) {
Serial.println(voice);
if (voice=='go'){
analogWrite(A0,0);
analogWrite(A1,255);
analogWrite(A2,0);
analogWrite(A3,255);
}
else if (voice=='comeback'){
analogWrite(A0,255);
analogWrite(A1,0);
analogWrite(A2 c,255);
analogWrite(A3,0);
}
voice="";
}
}
This is my code. It gets compiled and uploaded to the arduino properly. But when I command through my android bt voice controller app, nothing works. I'm unable to understand what's the problem.
int leftmotorForward=A3;
int leftmotorBackward=A0;
int rightmotorForward=A1;
int rightmotorBackward=A2;
char data=0;
void setup() {
Serial.begin(9600);
if (voice.length() > 0) {
Serial.println(voice);
if (voice=='go'){
analogWrite(A0,0);
analogWrite(A1,255);
analogWrite(A2,0);
analogWrite(A3,255);
}
else if (voice=='comeback'){
analogWrite(A0,255);
analogWrite(A1,0);
analogWrite(A2 c,255);
analogWrite(A3,0);
}
voice="";
}
}
This is my code. It gets compiled and uploaded to the arduino properly. But when I command through my android bt voice controller app, nothing works. I'm unable to understand what's the problem.