    while (millis() - startMillis < sampleWindow)
    {
       sample = analogRead(A0) / 4;
-      Serial.println("sample: " + String(sample));
+      // Serial.println("sample: " + String(sample));
       if (sample < 1024)  // toss out spurious readings
       {
          if (sample > signalMax)

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

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

   // draw the new sample
   for (int i = 0; i < maxScale; i++)
   {
      if (i >= displayPeak)  
      {
         setRow(i, strip.Color(0,0,0));
      }
      else if (i < redZone) 
      {
        setRow(i, strip.Color(0,255,0));
      }
      else
      {
        setRow(i, strip.Color(255,0,0));
      }
   }
   strip.show();
}

// void loop()
// {
//     // Serial.println("IP:" + String(ip));
//     //TCPServer/Client connections
//     if (client.connected()) {
//         String("CONNECTED").toCharArray(tcpstate, 64);
//         String dStr = "";
//         char data;
//         while (client.available()) 
//         {
//             data = client.read();
//             dStr += String(data);
//         }
//         // client.println("OK:" + dStr);
//         // client.flush();
//         // Serial.println("dStr: " + String(dStr));
//         loopArgs = stringSplit(dStr, ',');
//         action = loopArgs[0];
//         // dStr.toCharArray(action, 64);
//         // loopRun = action;
//         // client.stop();
//     } 
//     else 
//     {
//         // if no client is yet connected, check for a new connection
//         // Serial.println("DISCONNECT");
//         String("DISCONNECTED").toCharArray(tcpstate, 64);
//         client = server.available();
//         if(client.connected())
//             return;
//     }

//     if(action == SETROW)
//     {
//       setRow(stringToInt(loopArgs[1]), strip.Color(stringToInt(loopArgs[0]),
//                                                    stringToInt(loopArgs[1]),
//                                                    stringToInt(loopArgs[2])));
//       strip.show();
//       action = STOP;
//     }
// }

void setRow(int row, int color)
{

    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);
 }
}

