Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By mrburnette
#70623
andre_teprom wrote:...
I wonder how one could implement a longest delay by using the suggested structure with argument 0.
Interrupt-based delay is allways the better choice, since this way can use a time slot to split the tasks into specific time alocation.


One of the reasons Arduino users have problems using the ESP8266 is they fail to understand that two tasks exist on the ESP8266 when using the igrr Arduino: the native RF side and the Arduino side. These are proto-threads managed by the non-OS task switcher. A real RTOS is available from Espressif but is not used in the Arduino core written by igrr.

RTOS
https://github.com/espressif/ESP8266_RTOS_SDK

non-OS
https://github.com/espressif/ESP8266_NONOS_SDK


Ray
User avatar
By andre_teprom
#70630 Both SDKs location are well known by everybody, but it is out of context, OP's code were wrote for Arduino, as well as it is well know that Arduino does not nativelly implements any thread structure, therefore this does not explain your previous disagreement in regard to what I have recommended: "Prefers delays implemented by interruption rather than by closed loops".