Hello guys, i'm here again to be a waste of time to you.
Yesterday I did a 2 LED control Android APP via Bluetooth with a char variable and letters A, B and C.
Now i'm trying to do exactly the same but using an int variable and numbers 999, 1000 and 1001 but it doesn't work. I think my Android code is correct (anyways i will put it here) and my mistake is in the ArduCode
I have HC-05 Module and Arduino Uno board. Here is a screenshot of the Android code and the ArduCode. Thank you mates
void setup() {
pinMode(7,OUTPUT);
pinMode(8,OUTPUT);
Serial.begin(9600);
}
void loop() {
int data = Serial.read();
if(data == 999)digitalWrite(7,HIGH);
if(data == 1001)digitalWrite(8,HIGH);
if(data == 1000){
digitalWrite(7,LOW);
digitalWrite(8,LOW);
}
}
.