Hi!
I'm having a weird problem
I can do the following:
SENSOR - ARDUINO -HC06 -APP INVENTOR - SEE THE VALUE IN MY APP
But I can't do:
WRITE A VALUE IN THE APP/PRESS A BUTTON- APP INVENTOR - HC06 - ARDUINO - SERIAL
I mean I've trided the silder, the text box, a button but anything works
It's like the Serial.available() always return 0 even I press the button.
An example code for a button would be this one:
int valor;
void setup (){
Serial.begin(19200);
}
void loop(){
if (Serial.available()){
//doesn't get inside here
//it's always 0/-1
valor = Serial.read();
Serial.println(valor);
if (valor == 'A'){
Serial.println("hua");
}
if (valor == 'B'){
Serial.println("aueu");
}
}
}