Just to say, that library is expecting the Arduino-style 'loop', so compute basically polls to see when it should do stuff. It'd be much better if it was re-written to use setInterval, with maybe a callback for when the output value changes.
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.
Just to say, that library is expecting the Arduino-style 'loop', so
compute
basically polls to see when it should do stuff. It'd be much better if it was re-written to usesetInterval
, with maybe a callback for when the output value changes.