• Just to add to this - the ESP8266 needs to be able to execute tasks every so often to handle things like WiFi. If you block it executing them, it cannot function. Because of this there's a 'watchdog timer' which resets the whole device if a task doesn't complete in time, and that's what you're seeing.

    @allObjects above has shown you how to do what you need - the lack of a delay function in Espruino is very much intentional - because it encourages behaviour that causes problems for many of the devices Espruino runs on.

About

Avatar for Gordon @Gordon started