-->
Page 3 of 3

Re: Code for non-blocking tasks and shaky WiFi

PostPosted: Thu Oct 05, 2017 8:28 pm
by mrburnette
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

Re: Code for non-blocking tasks and shaky WiFi

PostPosted: Fri Oct 06, 2017 1:19 am
by andre_teprom
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".