Skip to content

Arduino movingAvg Library 2.0.0

Compare
Choose a tag to compare
@JChristensen JChristensen released this 31 Mar 02:09
· 8 commits to master since this release

Changes in this release

  1. Interval array is now dynamically allocated using the size passed to the constructor. This allows using different moving average interval sizes (i.e. the number of data points used for the average) without having to change the library, and also allows different movingAvg objects to have different interval sizes. See the README file for cautions regarding dynamic memory allocation.
  2. Changed the calculation method for the average when the interval array is not yet full. Previous behavior was to fill the interval array with the value provided with the first call to reading(), and to always calculate the average using the full array. Now the library tracks the number of entries in the array and until the array is full, only uses the actual data values supplied for the average. (Thanks, Duckie!)
  3. Added more example sketches, converted doc files to Markdown, changed to GNU GPL 3.0, general cleanup, style and cosmetic tweaks.