4.- Esp32 sends by classic Bluetooth, two random numbers to the app, they are displayed in a graph.
p62D_esp32_bluetooth_5.aia (16.5 KB)
ESP32 Code.
// Juan A. Villalpando.
// http://kio4.com/arduino/180_Wemos_Bluetooth_LED_Pulsadores.htm
#include "BluetoothSerial.h"
#if !defined(CONFIG_BT_ENABLED) || !defined(CONFIG_BLUEDROID_ENABLED)
#error Bluetooth no activado! Activa la conexion Bluetooth.
#endif
BluetoothSerial SerialBT;
int alea_1;
int alea_2;
unsigned long tiempo_actual_1 = 0;
unsigned long tiempo_actual_2 = 0;
void setup() {
Serial.begin(9600);
SerialBT.begin("ESP32test");
}
void loop() {
if((millis()-tiempo_actual_1)>= 200){
int alea_1 = random(0,100);
int alea_2 = random(0,1000);
tiempo_actual_1 = millis();
SerialBT.println(String(alea_1) + "," + String(alea_2));

