-->
Page 1 of 1

Help needed!

PostPosted: Tue Sep 13, 2016 10:04 am
by ssylca
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.

Re: Help needed!

PostPosted: Tue Sep 13, 2016 10:38 am
by Mmiscool
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

Re: Help needed!

PostPosted: Tue Sep 13, 2016 1:05 pm
by ssylca
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.