Hi,
I'm trying to make an RC tanks out of an arduino uno, a HC-05 and an app I made in MIT App inventor. I am still kind of new to making thing with arduino. I think that the signal between the app and Bluetooth chip isn't going through or it's an issue with the code. The all the code is below or in the picture below.
int inputVariable = 0;
void setup() {
Serial.begin(9600);
void loop() {
while(Serial.available() >= 0){
inputVariable = Serial.read();
}
if(inputVariable = 1){
digitalWrite (6,HIGH);
digitalWrite (7,LOW);
analogWrite (10,100);
digitalWrite (4,HIGH);
digitalWrite (5,LOW);
analogWrite (9,100);
}
if(inputVariable = 2){
digitalWrite (6,LOW);
digitalWrite (7,HIGH);
analogWrite (10,100);
digitalWrite (4,LOW);
digitalWrite (5,HIGH);
analogWrite (9,100);
}
if(inputVariable = 3){
digitalWrite (6,HIGH);
digitalWrite (7,LOW);
analogWrite (10,100);
digitalWrite (4,LOW);
digitalWrite (5,HIGH);
analogWrite (9,100);
}
if(inputVariable = 4){
digitalWrite (6,LOW);
digitalWrite (7,HIGH);
analogWrite (10,100);
digitalWrite (4,HIGH);
digitalWrite (5,LOW);
analogWrite (9,100);
if(inputVariable = 0){
digitalWrite (6,LOW);
digitalWrite (7,LOW);
analogWrite (10,100);
digitalWrite (4,LOW);
digitalWrite (5,LOW);
analogWrite (9,100);