         patternIndex = 0;
     else if (patternIndex >= patternCount)
         patternIndex = patternCount - 1;
-
+        
     pixelIndex = 0;
-
+    
     EEPROM.write(3, patternIndex);
-
+    
     return patternIndex;
 }
 

    Spark.syncTime();
    lastTimeSync = millis();
  }

  if(power < 1) {
      colorAll(strip.Color(0, 0, 0)); // Black
      strip.show();
      delay(250);
      return;
  }

  uint8_t wait = 30;

  switch(patternIndex)
  {
      case 0:
      wait = colorWipe(strip.Color(255, 0, 0)); // Red
      break;

      case 1:
      wait = colorWipe(strip.Color(0, 255, 0)); // Green
      break;

      case 2:
      wait = colorWipe(strip.Color(0, 0, 255)); // Blue
      break;

      case 3:
      wait = rainbowCycle();
      break;

      case 4:
      default:
      wait = rainbowSpin();
      break;

      case 5:
      wait = colorAll(strip.Color(0, 255, 255)); // Magenta
      break;

      case 6:
      wait = sparkle(strip.Color(255, 255, 255));
      break;

      case 7:
        colorIndex++;
        if(colorIndex >= 256)
            colorIndex = 0;

      wait = sparkle(Wheel(colorIndex));
      break;

      case 8:
      wait = wave(.1);
      break;

      case 9:
      wait = analogClock();
      break;
  }

  strip.show();
  delay(wait);
}

        strip.setPixelColor(minuteIndex, strip.Color(0, 255, 0));
        strip.setPixelColor(hourIndex, strip.Color(255, 0, 0));
    }
        
    return 20;
}

