     return strArr;
 }
 
+// Input a value 0 to MAX_COLOR to get a color value.
+// The colours are a transition r - g - b - back to r.
+uint32_t Wheel(byte WheelPos) {
+  int maxVal = MAX_COLOR;
+  if(WheelPos < 85) {
+     return strip.Color(WheelPos * 3, maxVal - WheelPos * 3, 0);
+ } else if(WheelPos < 170) {
+     WheelPos -= 85;
+     return strip.Color(maxVal - WheelPos * 3, 0, WheelPos * 3);
+ } else {
+     WheelPos -= 170;
+     return strip.Color(0, WheelPos * 3, maxVal - WheelPos * 3);
+ }
+}
+


}


const int maxScale = 24;
const int redZone = 5;

const int sampleWindow = 100; // Sample window width in mS (50 mS = 20Hz)
unsigned int sample;

void loop() 
{
   unsigned long startMillis= millis();  // Start of sample window

      }
   }
   peakToPeak = signalMax - signalMin;
   // Serial.println("peakToPeak: " + String(peakToPeak));
   if(peakToPeak < 0)
      peakToPeak = 0;

   // map 1v p-p level to the max scale of the display
   int displayPeak = map(peakToPeak, 0, 1023, 0, maxScale);
   if(displayPeak < 0)
    displayPeak = 0;
   Serial.println("peakToPeak: " + String(peakToPeak) + "   displayPeak: " + String(displayPeak));

   //upside down now
   displayPeak = maxScale - displayPeak;
   for (int i = maxScale; i >= 0; i--)
   {
      if (i < displayPeak)  
      {
         setRow(i, strip.Color(0,0,0));
      }
      else if (i >= orangeZone) //green
      {
        setRow(i, Wheel(colorCount));
      }
      else if (i <= orangeZone + redZone && i > redZone) //orange
      {
        setRow(i, strip.Color(255,128,0));
      }
      else //red
      {
        setRow(i, strip.Color(255,0,0));
      }
   }

   if(colorCount >= MAX_COLOR)
    colorCount = 0;
   else
    colorCount++;

   strip.show();
}

void setRow(int row, int color)
{
