 }
   
 void alloff() {
-  for (int i = NUM_LEDS; i >=0; i--) {
+  for (int i = NUM_LEDS-1; i >=0; i--) {
     leds[i]=CRGB::Black;
     delay(10);
     FastLED.show();

    //int pos_led=map(int_angle,45,-45,1,NUM_LEDS);
    int pos_led=map(int_angle,-45,45,1,NUM_LEDS);
    int couleur_led=map(pos_led,0,NUM_LEDS,0,255);
    for (int i = NUM_LEDS; i >=0; i--){
      if (i==pos_led){leds[i]=CHSV(couleur_led, 255, 255);}
      //if (i==pos_led){leds[i]=CRGB::Blue;}
      else {leds[i]=CRGB::Black;}

  if (pattern=="game_over"){
    digitalWrite(MOSFET_GATE,HIGH);
    FastLED.setBrightness(LOW_BRIGHTNESS); 
    for (int i = NUM_LEDS-1; i >=0; i--){
      leds[i]=CRGB::Red;
    }
  }
  
  if (pattern=="off"){
    for (int i = NUM_LEDS-1; i >=0; i--) {
      //leds[i]=CRGB::Black;
      leds[i].nscale8(230);
    }
