Hi, I am getting sets of data strings from a sensor that I would like to average as new data comes out. Would the average library allow me to do this, if so how can I get individual data points using the ave.push function?, Thanks.
Hi, I am getting sets of data strings from a sensor that I would like to average as new data comes out. Would the average library allow me to do this, if so how can I get individual data points using the ave.push function?, Thanks.
Alejandro, yes you can use the averages library for this.
Have a look at the example https://github.com/MajenkoLibraries/Average/blob/master/examples/AverageExample/AverageExample.ino
You should be able to merge that in with your current code.
Looking at how push works you can keep adding values and it keeps the last X and throws away the oldest values.
Alejandro, yes you can use the averages library for this.
Have a look at the example https://github.com/MajenkoLibraries/Average/blob/master/examples/AverageExample/AverageExample.ino
You should be able to merge that in with your current code.
Looking at how push works you can keep adding values and it keeps the last X and throws away the oldest values.