Hi - I just tried this and it looks neat.
One thing I can see is you call drawTimeout = setTimeout(function() { once at startup, which will ask it to redraw when the minute changes.
drawTimeout = setTimeout(function() {
But after that you don't call it again. I think you really need to copy:
drawTimeout = setTimeout(function() { drawTimeout = undefined; draw(); }, 60000 - (Date.now() % 60000));
and paste it into the end of the draw() function and you'll probably be ok then?
draw()
@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.
Hi - I just tried this and it looks neat.
One thing I can see is you call
drawTimeout = setTimeout(function() {
once at startup, which will ask it to redraw when the minute changes.But after that you don't call it again. I think you really need to copy:
and paste it into the end of the
draw()
function and you'll probably be ok then?