Hello,
yesterday I was searching for a suitable smartphone app creator app for my project and I came across MIT APP Inventor - which means my question will probably be very basic and easy to answer for most.
What exactly I am trying to do is simple - I am working on a very specific project and I need to read stored values in my ESP32 EEPROM where ESP32 is connected to my smartphone via BT. The connection between the two I have successfully managed to establish. However what I am struggling with is reading the serial monitor.
/////////////////////////////////
// Generated with a lot of love//
// with TUNIOT FOR ESP32 //
// Website: Easycoding.tn //
/////////////////////////////////
#include "BluetoothSerial.h"
#include "esp_bt_main.h"
#include "esp_bt_device.h"
#include <EEPROM.h>
float value = 458.36;
float k = 0;
String DATA;
#if !defined(CONFIG_BT_ENABLED) || !defined(CONFIG_BLUEDROID_ENABLED)
#error Bluetooth is not enabled! Please run make menuconfig
to and enable it
#endif
BluetoothSerial SerialBT;
void printDeviceAddress() {
const uint8_t* point = esp_bt_dev_get_address();
for (int i = 0; i < 6; i++) {
char str[3];
sprintf(str, "%02X", (int)point[i]);
Serial.print(str);
if (i < 5){
Serial.print(":");}
}
Serial.println();
}
void setup()
{
Serial.begin(9600);
EEPROM.begin(4);
EEPROM.writeFloat(0, value);
EEPROM.commit();
delay(5000);
SerialBT.begin("ESP32test");
Serial.println("This is your address:");
printDeviceAddress();
}
void loop()
{
k = EEPROM.readFloat(0);
Serial.print(k, 2);
Serial.print("\n");
delay (10000);
}
As you can see it is quite simple - I read the saved float from the eeprom in serial monitor. Now all I need to do is to be able to read this data on my smartphone. Now in the image of blocks some may not make much sense since I have never touched such thing before but what I did was watch some youtube tutorials and tried to figure it myself since everyone was doing kinda the same thing but differently. But I still didn't manage to display anything on my smartphone. The android version is 9 PKQ1.180904.001. Please pardon my formatting, this is my very first post too.