20.- Get message when Bluetooth has disconnection failure.
p9A01_bluetooth_faliure.aia (4.0 KB)
- Arduino sends random numbers to App:
// Juan A. Villalpando
// http://kio4.com/appinventor/9A0_Resumen_Bluetooth.htm
int aleatorio;
void setup() {
Serial.begin(9600);
}
void loop() {
aleatorio = random(0,100);
Serial.println(aleatorio);
delay(400); // Clock.Interval < delay Arduino
}
-
App receives those numbers and shows.
-
Disconnect the power cable from the Arduino.
-
You will get the approximate time of that disconnection.
-
In the previous blocks observe SendText = 3, this is dumb number, when that number is sent and the Bluetooth does not receive it, we get error 516: Unable to write: Broken pipe.

