Hi to all.
i need your help about delays in app inventor (never used them before in 3-4 small projects i made so far)
So i have one app that connects to a bluetooth (esp32 microcontroller)
from my app i want to change some values in the eeprom of the microcontroller.
my app works like this :
- connect to bluetooth
- switch on the parameter edit
- change the value from the slider
- press send button to send the value to microcontroller
- press save to store the value to the eeprom
- switch off the parameter edit
until here is something that i have done it and work fine..
i wanted to make it so when someone press the save button then the the switch goes off and not to have to make one more step to switch it off as in my original app
The problem is that when i press the save button i send a special number to the microcontroller that when it reads it know that have to save the previous value to the eeprom and with switch off command i am sending an other special value to the microcontroller to raise a flag to my program.
so when i make the mobile app to switch off the edit at the same time i press save the app sends the 2 numbers as one... no delay between them and so my code in the microcontroller not working
so i thought to interval a delay between the 2 functions
i found a delay example but it didnt work for me (i am not sure if i embedded right )
here is a small example how i made my app with just one edit button (have to connect to a bluetooth to enable switch button)
delay.aia (4.6 KB)
thanks in advance