LOW_MEMORY - Espruino ran low on memory while executing code, and had to delete command history and some other stuff so it could try and run your code properly
MEMORY - Espruino totally ran out of memory and couldn't execute and more, so it had to stop running your code.
The code you actually want (using timeouts as intended) is probably:
Note that when you do it that way, you're actually able to do execute other code in the background as well, because you're not completely stopping execution.
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.
As @Wilberforce says...
Just to clarify though
LOW_MEMORY,MEMORY
means:LOW_MEMORY
- Espruino ran low on memory while executing code, and had to delete command history and some other stuff so it could try and run your code properlyMEMORY
- Espruino totally ran out of memory and couldn't execute and more, so it had to stop running your code.The code you actually want (using timeouts as intended) is probably:
Note that when you do it that way, you're actually able to do execute other code in the background as well, because you're not completely stopping execution.