AnalogSmoother (community library)

Summary

Name Value
Name AnalogSmoother
Version 1.0.0
Installs
License MIT
Author Nicholas Cox, nickcox1008@gmail.com
Maintainer Nicholas Cox https://github.com/knickers
URL https://github.com/knickers/AnalogSmoother
Repository git@github.com:knickers/AnalogSmoother.git
Download .tar.gz

Smooth analog input readings through a running average buffer. Provides a single method that reads the value of an analog input and returns the average of the last N readings.

Example Build Testing

Device OS Version:

This table is generated from an automated build. Success only indicates that the code compiled successfully.

Library Read Me

This content is provided by the library maintainer and has not been validated or approved.

AnalogSmoother

This library employs a running average to smooth analog input readings.

#include "AnalogSmoother.h"

AnalogSmoother sensor(A0, 10); // Buffer size of 10 readings

void setup() {
Serial.begin(115200);

// Optional, fill the buffer with actual readings from the sensor
sensor.fill();
}

void loop() {
// Draw 2 lines in the serial plotter
Serial.print(analogRead(A0));
Serial.print(" ");
Serial.println(sensor.read());

// Slow down the serial output
delay(10);
}

Browse Library Files