• 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.

About

Avatar for Gordon @Gordon started