That looks great! The rescheduling would be good... I guess just:
y=0; function next() { for (let x = 1; x<17; ++x){ ... } } y++; if (y>=17) { flip(); // restart y=0; // flip generations var t = genA; genA = genB; genA = t; } }
You could then just use setInterval on next with a ~50ms interval?
setInterval
next
@Gordon started
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.
That looks great! The rescheduling would be good... I guess just:
You could then just use
setInterval
onnext
with a ~50ms interval?