     } else {
       //otherwise, pick a random color and set each pixel individually to that color
       //with a random time delay between setting each pixel
-      stepLights(colors[(int)random(1, numColors + 1)], (int)random(50, 500));
+      //stepLights(colors[(int)random(1, numColors + 1)], (int)random(50, 500));
+      //For a smoother color transition, use the following:
+      swapColor(colors[(int)random(1, numColors + 1)], (int)random(25, 200));
     }
   } else {
     //Use wasOn to make sure we only turn the lights off once (after they've

  //on or off.
  wasOn = false;

  Serial.println("Exiting setup()");
}

void loop() {

  //Start trying to connect to the local Wi-Fi network
  WiFi.begin(wifi_ssid, wifi_pass);
  //Loop until connected
  // todo: add a loop counter, and drop out after 10 tries or so
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
