I guess the easiest is just:
function analogReadAvr(p) { var n=0,i=100; while (i--) n+=analogRead(p); return n/100; }
But you can do other things - for example reading in the background using Waveform, and/or using .sort to do median filtering.
Waveform
.sort
@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.
I guess the easiest is just:
But you can do other things - for example reading in the background using
Waveform
, and/or using.sort
to do median filtering.