So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By McChubby007
#73723 The 'loop context' must give the system context a chance to run for two reasons : 1. To refresh the watchdog, 2. To perform system 'stuff' like wifi/tcp and any async-style library processing, and also when using the schedule library. The watchdog needs to be refreshed every few seconds (can't remember the actual figure). The other system tasks will need processing frequency depending on what domain/application the esp8266 is being used in.

This can be done either periodically calling yield or delay(0). Using a non-zero time period for delay is really a choice for the user code design when it needs to wait a specific time before/between doing something - personally I never use delay to time events/waits and use actual timer ticks for time references, that allows your code to work in a more asynchronous way. delay in my mind is a throw back to arduino and causes more problems than it solves with hard-coded waits in code here and there, when a 'better' design should have been to not rely on waits mixed inside the code.