Thanks @Gordon
Another quick question, do you think my approach of using Date.now()-timePast>100 for sampling rate is efficient or you recommend any other way?
I took inspiration from Arduino millis() function
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.
Thanks @Gordon
Another quick question, do you think my approach of using
Date.now()-timePast>100
for sampling rate is efficient or you recommend any other way?I took inspiration from Arduino
millis()
functionThanks again