Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
en:iot-open:practical:hardware:sut:esp32:adv1_1 [2024/03/26 08:43] – [ADV1: Using timers to execute code asynchronously] pczekalskien:iot-open:practical:hardware:sut:esp32:adv1_1 [2024/03/26 08:46] (current) – [Steps] pczekalski
Line 117: Line 117:
  
 === Step 7 === === Step 7 ===
-This way, a main loop is empty: everything runs asynchronously, thanks to the timers.+This way, a main loop is empty: everything runs asynchronously, thanks to the timers. As suggested above, when timer handlers require long or unpredictable execution time (e.g. external communication, waiting for the reply), handlers should set a flag that is read in the main loop to execute the appropriate task and then clear the flag.
 <code c> <code c>
 void loop() void loop()
en/iot-open/practical/hardware/sut/esp32/adv1_1.1711442606.txt.gz · Last modified: 2024/03/26 08:43 by pczekalski
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0