Skip to content

Releases: JChristensen/movingAvg

Arduino movingAvg Library 2.3.2

04 Nov 15:13
Compare
Choose a tag to compare

Add an optional parameter to the constructor to cause getAvg() to return zero instead of causing a divide-by-zero situation if it is called before any readings are recorded.

Arduino movingAvg Library 2.3.1

03 Mar 22:01
Compare
Choose a tag to compare
  • Fix calculation for most recent "n" points (i.e. the getAvg(int) function)
  • If given an improper number of points, getAvg(int) now returns zero.

Arduino movingAvg Library 2.3.0

24 Feb 17:49
Compare
Choose a tag to compare
  • Add method to calculate shorter-term average using only a specified number of the most recent data points.
  • Add example sketch to demonstrate new method.

Arduino movingAvg Library 2.2.0

19 Aug 01:16
Compare
Choose a tag to compare

Add function to return pointer to readings array.
Add example sketch to demonstrate.
Update README.

Arduino movingAvg Library 2.1.1

16 Jan 03:03
Compare
Choose a tag to compare

Add getCount() function.

Arduino movingAvg Library 2.1.0

03 Apr 16:36
Compare
Choose a tag to compare

Changes in this release

  1. Added reset() function to restart the moving average calculation.

Arduino movingAvg Library 2.0.0

31 Mar 02:09
Compare
Choose a tag to compare

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.