 //  NOTE: The larger NUM_SAMPLES, the smoother the values, but also
 //  the longer it will take the average to move in response to you turning the
 //  potentiometer
-const int NUM_SAMPLES = 10;
+const int NUM_SAMPLES = 20;
 int potSamples[NUM_SAMPLES];
 int potIndex = 0;
 int totalPotValue = 0;

  Serial.println(lastAveragePotValue);
  
  // Delay
  delay(50);
}


  
  // Detect whether the new average pot value has changed enough
  // from our last saved average pot value
  int change = abs(averagePotValue-lastAveragePotValue);
  if (change >= CHANGE_THRESHOLD){
    lastAveragePotValue = averagePotValue;
  }
  
