Hi there I am using an adafruit ultimate v3 with a feather v2 esp32 and I am trying to map the latitude and longitude data that gets send over bluetooth to different map markers in an app. The difficulty i am having is splitting the data I am receiving and then setting the marker longitude and latitude markers using the data. A few things that makes this more difficult is that i have not got a set number of markers as depending on how long the user would like to log data a different number of points will be recorded.
so far i have been able to send a the data string to a "serial monitor" i have set up in the app but have not been able to get much further.
The relevant arduino code for this is as follows:
if (ESPFeather.available()) {
incoming = ESPFeather.read();
int button = floor(incoming / 10);
int value = incoming % 10;
case 2:
Serial.print("Button 2: "); Serial.println(value);
if (value == 1) {
// Read GPS data and print to Serial Monitor
File file = SPIFFS.open("/gps_data.txt", FILE_READ);
if (!file) {
ESPFeather.println("Failed to open file for reading");
return;
}
ESPFeather.println("Sending GPS data:");
while (file.available()) {
ESPFeather.write(file.read());
}
file.close();
ESPFeather.println("GPS data sent.");
}
}
case 2 refers to button 2 on the app
The app code looks like this: (I know it is not even close but i'm not sure where to go from here any help would be greatly appreciated)