the current 'wait x seconds' for Espruino blockly doesn't always work as intended.
for example, if a while(true) loop containing a wait x seconds block, for javascript, it doesn't really wait for the setTimeout function and will just immediately execute the next iteration.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
the current 'wait x seconds' for Espruino blockly doesn't always work as intended.
for example, if a
while(true)
loop containing await x seconds
block, for javascript, it doesn't really wait for the setTimeout function and will just immediately execute the next iteration.e.g. the attached image will be converted to:
Which is pretty confusing for the blockly user
So I implement a sleep function as stated in https://stackoverflow.com/a/16624104/63226
It works when I execute like sleep(1000) or sleep(2000), but for sleep(3000) the nodeMCU resets itself.
Is there a max execution time that forced the nodeMCU to reset? if yes, then how to increase it?
Thanks
1 Attachment