General area when it fits no where else

Moderator: Mmiscool

User avatar
By ssylca
#55024 Hi,
Is there a way to break from a running programme and regain control of the editor without doing a hardware reset. I have ESP's monitoring various environmental events and need to access the EDIT function to modify the programme OTA. Could one suggest some code to achieve this? As it is now I just post data to Thingspeak on a regular basis.
Thanks,
S.
User avatar
By Mmiscool
#55026 If you have a task that needs to run periodically it is better to use a timer function in stead of an endless loop.

In the following example the timer will execute the test branch every second. Because of the wait statement it will be responsive to being able to get to edit page.
example:

Code: Select alltimer 1000, [test]
wait

[test]
serialprintln temp(0)
wait
User avatar
By ssylca
#55036
Mmiscool wrote:If you have a task that needs to run periodically it is better to use a timer function in stead of an endless loop.

In the following example the timer will execute the test branch every second. Because of the wait statement it will be responsive to being able to get to edit page.
example:

Code: Select alltimer 1000, [test]
wait

[test]
serialprintln temp(0)
wait


Thank you for your help, I will do that.
S.