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 " )
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
Thanks for the reply... so i have to check how to checl length of the lists after splitting..
will be my next google search after this post.. thanks for your guideness.
The delay function was embedded later trying to fix the problem that after sending the number to Esp32 didnt read the incoming data from esp32 unless if i was disconnected and connect again to the BlueTooth.
so i will remove the Delay Function from the blocks
still looking for help about my first problem.. (after send the number to Esp32 to do special routine based on the number) cant receive - display the incoming data from Esp32, i have to close app and then open it again in order to display the incoming data