No,
do not mix both approaches! Either use setTimeout as shown above or start a new setInterval whenever your drawing period changes:
setTimeout
setInterval
var TimerId = setInterval(draw,1000) ... clearInterval(TimerId) TimerId = setInterval(draw,60000)
@Andreas_Rozek 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.
No,
do not mix both approaches! Either use
setTimeout
as shown above or start a newsetInterval
whenever your drawing period changes: