 
           waitTime = client.parseInt();
 
-              client.stop();
-              
-              
+          client.stop();
+
+
           uint32_t c;
           uint32_t wait;
 

  client.stop();
  delay(50);

}
//
//void process(YunClient client) {
//  // read the command
//  String command = client.readStringUntil('/');
//
//  // is "message" command?
//  if (command == "light") {
//    lightCommand(client);
//  }
//}
//
//void lightCommand(YunClient client) {
//
//
//  int programMode = client.parseInt();
//  int redRaw = client.parseInt();
//  int redVal = constrain(redRaw, 0, 255);
//  client.print("redval: " );
//  client.println(redVal);
//
//  int greenRaw = client.parseInt();
//  int greenVal = constrain(greenRaw, 0, 255);
//  client.print("greenval: " );
//  client.println(greenVal);
//
//  int blueRaw = client.parseInt();
//  int blueVal = constrain(blueRaw, 0, 255);
//  client.print("blueval: " );
//  client.println(blueVal);
//
//  // Send feedback to client
//  client.print("Command found is ");
//  client.println(programMode);
//
//      switch (programMode) {
//        case 0:
//          allColor(strip.Color(0, 0, 0)); //off
//          break;
//        case 1:
//          softBlink(strip.Color(redVal, greenVal, blueVal), 255, 50); // blue
//          break;
//        case 2:
//          colorWipeCycle(strip.Color(0, defaultBrightness, 0), 500); // green
//          break;
//        case 3:
//          softBlink(strip.Color(0, 0, 255), defaultBrightness, 50); // blue
//          break;
//        case 4:
//        // rainbow
//        currentCycles = wait;
//  while ( wait > currentCycles ) {
//
//  unsigned long currentMillis = millis();
//  if (currentMillis - previousMillis > wait) {
//    // save the last time you changed a NeoPixel
//    previousMillis = currentMillis;
//
//    //change the colors of the pixels
//    uint16_t i;
//    for (i = 0; i < strip.numPixels(); i++) {
//      strip.setPixelColor(i, Wheel((i + neoPixel_j) & 255));
//    }
//    strip.show();
//    neoPixel_j = (neoPixel_j + 1) % 255; //increment j until all colors are used, then start over
//  }
//  currentCycles++;
//
//  }
//
//
//
//
//
//          break;
//        case 5:
//          rainbowCycle(10);
//          break;
//        case 6:
//          client.println("in program 6");
//          client.println();
//          client.println(redVal);
//          client.println(greenVal);
//          client.println(blueVal);
//          client.println();
//          allColor(strip.Color(redVal, greenVal, blueVal)); //off
//          client.println("end program 6");
//          break;
//        case 7:
//          break;
//        case 8:
//          allColor(strip.Color(redVal, greenVal, blueVal)); //off
//          break;
//        default:
//          // if nothing else matches, do the default
//          allColor(strip.Color(0, 0, 0)); //off
//      }
//
//}

// Fill all the dots with one color
void allColor(uint32_t c) {
  for (uint16_t i = 0; i < strip.numPixels(); i++) {
    strip.setPixelColor(i, c);
    strip.show();
  }
} // note for a random color, use:
// allColor((unsigned long)random(0x01000000));



void blinkColor(uint32_t c, uint8_t wait) {
  unsigned long currentMillis = millis();


  if (currentMillis - previousMillis > wait) {
    // save the last time you blinked the LED
    previousMillis = currentMillis;
    // if the LED is off turn it on and vice-versa:
    if (ledState == LOW) {
      ledState = HIGH;
      allColor(c);
    } else {
      ledState = LOW;
      allColor(strip.Color(0, 0, 0)); // off
    }
  }
}



// Fill the dots one after the other with a color
void colorWipe(uint32_t c, uint8_t wait) {
  unsigned long currentMillis = millis();
  //only do this if some of the pixels still need to be lit
  if (neoPixelToChange <= NUMPIXELS) {
    if (currentMillis - previousMillis > wait) {
      // save the last time you changed a NeoPixel
      previousMillis = currentMillis;
      //change a pixel
      strip.setPixelColor(neoPixelToChange, c);
      strip.show();
      neoPixelToChange++;
    }
  }
}



// Fill the dots one after the other with a color
void colorWipeCycle(uint32_t c, uint8_t wait) {
  unsigned long currentMillis = millis();
  //only do this if some of the pixels still need to be lit
  if (neoPixelToChange <= NUMPIXELS) {
    if (currentMillis - previousMillis > wait) {
      // save the last time you changed a NeoPixel
      previousMillis = currentMillis;
      //change a pixel
      strip.setPixelColor(neoPixelToChange, c);
      strip.show();
      neoPixelToChange++;
    }
  } else {
    // reset the cycle
    previousMillis = 0;
    neoPixelToChange = 0;
    allColor(strip.Color(0, 0, 0));
  }
}



void rainbow(uint8_t wait) {
  currentCycles = wait;
  while ( wait > currentCycles ) {

    unsigned long currentMillis = millis();
    if (currentMillis - previousMillis > wait) {
      // save the last time you changed a NeoPixel
      previousMillis = currentMillis;

      //change the colors of the pixels
      uint16_t i;
      for (i = 0; i < strip.numPixels(); i++) {
        strip.setPixelColor(i, Wheel((i + neoPixel_j) & 255));
      }
      strip.show();
      neoPixel_j = (neoPixel_j + 1) % 255; //increment j until all colors are used, then start over
    }
    currentCycles++;

  }


}





// Slightly different, this makes the rainbow equally distributed throughout
void rainbowCycle(uint8_t wait) {
  unsigned long currentMillis = millis();
  if (currentMillis - previousMillis > wait) {
    // save the last time you changed a NeoPixel
    previousMillis = currentMillis;
    //change the colors of the pixels
    uint16_t i;
    for (i = 0; i < strip.numPixels(); i++) {
      strip.setPixelColor(i, Wheel(((i * 256 / strip.numPixels()) + neoPixel_j) & 255));
    }
    strip.show();
    neoPixel_j = (neoPixel_j + 1) % 1279; // 5 cycles of all colors on wheel, then start over
  }
}


void softBlink(uint32_t c, uint8_t brightness, uint8_t wait) {
  unsigned long currentMillis = millis();
  if (currentMillis - previousMillis > wait) {
    //set the color of all pixels
    allColor(c); // is there a way to set this only once per program ????????????????????
    // save the last time you changed a NeoPixel
    previousMillis = currentMillis;
    uint16_t i;
    int b = (neoPixel_j * brightness) / brightness;
    strip.setBrightness(b);
    strip.show();
    // sometime figure out how to get this to fade down too instead of just restarting //////////////////////
    neoPixel_j = (neoPixel_j + 1) % brightness;
  }
}

// Input a value 0 to 255 to get a color value.

              int redNow = 0;
              int greenNow = 0;
              int blueNow = 0;

              for (r = 0; r < redDif; r++) {
                redNow = redStartVal + r;
                allColor(strip.Color(constrain(redNow, 0, 255), constrain(greenNow, 0, 255), constrain(blueNow, 0, 255)));
