#include <Smooth.h>

#define SMOOTHED_SAMPLE_SIZE 10
Smooth smoothedBrightnessPot(SMOOTHED_SAMPLE_SIZE);

void setup() {
  Serial.begin(115200);
  pinMode(A0, INPUT);
}

void loop() {
  int value = analogRead(A0);
  int smoothedSpeed = smoothedBrightnessPot += value;

  Serial.print(value);
  Serial.print(",");
  Serial.println(smoothedSpeed);
  delay(100);
}