• Just to add, the reason there isn't a delay function is because the interpreter isn't multi-threaded, so when you start writing functions that take a long time to execute, things start to lag and potentially data that comes in via Serial/USB/etc gets lost (if buffers get full).

    Generally there are pretty easy ways around it - but if there was a simple delay() command then most people wouldn't bother and their experience of using Espruino would be much worse :)

About

Avatar for Gordon @Gordon started