 int currentSpeed = 20;
 bool isAnimation = true;
 int counter = 0; // Compteur pour la mise a jour du random
+bool pause = false;
 
 uint8_t buffer[BUFFER_SIZE+1];
 int bufindex = 0;

            PRINT_DEBUG("currentSpeed: ", value);
          #endif
        }
        
        if (callback != NULL) {
          if (!isAnimation) {

    Serial.println(F("Client disconnected"));
    client.close();
  }
  if (!pause) {
    // Update pixels based on current state.
    if (!isAnimation) {
      if (currentPattern == BARS) {
        bars(schemes[currentScheme], barWidthValues[currentWidth], currentSpeed);
      } else if (currentPattern == GRADIENT) {
        gradient(schemes[currentScheme], gradientWidthValues[currentWidth], currentSpeed);
      }
    } else {
      if (currentAnimation == RANDOM) {
        // Some example procedures showing how to display to the pixels:
        colorWipe(strip.Color(255, 0, 0), 50); // Red
        colorWipe(strip.Color(0, 255, 0), 50); // Green
        colorWipe(strip.Color(0, 0, 255), 50); // Blue
        // Send a theater pixel chase in...
        theaterChase(strip.Color(127, 127, 127), 50); // White
        theaterChase(strip.Color(127, 0, 0), 50); // Red
        theaterChase(strip.Color(0, 0, 127), 50); // Blue
      
        rainbows(20);
        rainbowCycle(20);
        theaterChaseRainbow(50);
      } else {
        switch(currentAnimation) {
          case RAINBOWS:
            rainbows(currentSpeed);
            break;
          case RAINBOW_CYCLE:
            rainbowCycle(currentSpeed);
            break;
          case COLOR_WIPE:
            colorWipe(Wheel(randomByte()), currentSpeed);
            break;
          case THEATER_CHASE:
            theaterChase(Wheel(randomByte()), currentSpeed); // Blue
            break;
          case THEATER_CHASE_RAINBOW:
            theaterChaseRainbow(currentSpeed);
            break;
        }
      }
    }
  }
