Hello,
I am developing an Android application to monitor a cell pack.
In case it was helpful to anyone, I share the .aia of AI2 and the scketch of arduino. In the sketch, data is sent, not readings, to check the correct functioning of the app. I think it is a readable, simple and very useful code. They are the first steps of the app. I'm still trying to add a virtual screen to graph the tensions of the pack. I will update the progress.
get-several-data-BT-ESP32.aia (29.4 KB)
//------------------------------------------------------------------------------------------
#include <BluetoothSerial.h>
// Open BT channel
BluetoothSerial ESP_BT;
void setup()
{
Serial.begin(9600);
// Give a name to ESP32
ESP_BT.begin("ESP_test");
}
void loop()
{
// The all next variables for storage any analog read, etc
int V1 = 1111;
int V2 = 2222;
int V3 = 3333;
int V4 = 4444;
int V5 = 5555;
int V6 = 6666;
int V7 = 7777;
int current = random(1,10);
// If you prefer define other limiter you must change it in this sketch and in el .aia del AP2
ESP_BT.print(V7);
ESP_BT.print("|"); // limiter
ESP_BT.print(V6);
ESP_BT.print("|");
ESP_BT.print(V5);
ESP_BT.print("|");
ESP_BT.print(V4);
ESP_BT.print("|");
ESP_BT.print(V3);
ESP_BT.print("|");
ESP_BT.print(V2);
ESP_BT.print("|");
ESP_BT.print(V1);
ESP_BT.print("|");
ESP_BT.println(current); //important the line break
delay(300);
}
//------------------------------------------------------------------------------------------