Hi to all friends here.
i want to make an app to use it with my esp32 with Bluetooth
how my app supposed to work :
open the app , choose bluetooth device to connect, after connection you choose a number (1-4) , the app sends that number through Bluetooth to the arduino program, reads it and then the program depending the number sends the sensors values (if you choose 1 you receive values for the first only sensor, if you choose 2 then receiving for the first two sensors etc)
My first problem is that after i choose the number the esp32(program) receive it and doing what must do. The Android app stops there.. dont show the values . i have to close the app and run it again and after i connect to the Bluetooth device start showing them (with the other problem about " select list item: List index too Large " )
here is the arduino code :
esp32_Bt_mitapp.txt (6.1 KB)
and here is the aia :
Esp32_Bt_clasic_Rx_tx.aia (10.4 KB)
Some extra about arduino code :
i am using a loadcell with HX711 sensor , inside the sketch there is the link for the library. You can run the code with no need to have the loadcell or HX711 .
when the code runs for first time initialize the sensor for one time and then waits for incoming message (number). After the received number depending the number value check and report (via Bluetooth) the corresponding sensors