Bluetooth HC-06. Arduino. Send. Receive. Send text file. Multitouch. Image

21.- Arduino sends three random numbers to App.

p9A0i_bluetooth_aleatorios.aia (3.9 KB)

// Juan A. Villalpando
// http://kio4.com/appinventor/9A0_Resumen_Bluetooth.htm

int x;
int y;
int z;
String datos;

void setup() {
 Serial.begin(9600);
}

void loop() {
x = random(0, 10);
y = random(10, 100);
z = random(100,1000);
datos = (String) x + "," + (String) y + "," + (String) z;
Serial.println("Números aleatorios:");
Serial.println("Random numbers:");
Serial.println(datos);

delay(800);
}

Note that it only shows up when a list of 3 items arrives. Not shown:
Serial.println("Números aleatorios:");
Serial.println("Random numbers:");