11.- Virtual Screen with two VerticalArrangement.
p9A0i_bluetooth_virtual.aia (4.1 KB)
- In this example I have used Send1ByteNumber, I have arbitrarily chosen the numbers 153,168,221.
- Arduino returns a byte 48 or 49.
// Juan A. Villalpando
// http://kio4.com/appinventor/9A0_Resumen_Bluetooth.htm
#define LED13 13
byte StatusLED13;
void setup()
{
Serial.begin(9600);
pinMode(LED13, OUTPUT);
}
void loop() {
if(Serial.available())
{
int dato = Serial.read();
if(dato == 153){digitalWrite(LED13, HIGH);}
if(dato == 168){digitalWrite(LED13, LOW);}
if(dato == 221){
StatusLED13 = digitalRead(LED13);
Serial.print(StatusLED13); // Sends 48 or 49
}
}
}

