You seem to have commented out the line cycle = setInterval(doLights,50);
I guess it was failing because you moved the definition of doLights to be after the command, where it was before? Just put the line cycle = setInterval(doLights,50); after you defined doLights.
If you get an error and comment stuff out, can say in the future? It can save a lot of time.
Also, if you want code to show up in the forum properly, you need to highlight it and click the </> code button - I've just done that for you above.
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.
You seem to have commented out the line
cycle = setInterval(doLights,50);
I guess it was failing because you moved the definition of
doLights
to be after the command, where it was before? Just put the linecycle = setInterval(doLights,50);
after you defineddoLights
.If you get an error and comment stuff out, can say in the future? It can save a lot of time.
Also, if you want code to show up in the forum properly, you need to highlight it and click the
</> code
button - I've just done that for you above.