Problème programme

void setup() {
  pinMode(8, OUTPUT); //Led rouge
  pinMode(7, OUTPUT); //Led Orange
  pinMode(6, OUTPUT); //Led Verte
  pinMode(5, INPUT); //BoutonPoussoir/Interrupteur
}

void loop() {
  boolean BP;
  BP = digitalRead (5);
  if (BP == 1) {
    while (true) {
      if (BP == 1) {
        digitalWrite(8, HIGH);
        delay(4000);
        digitalWrite(8, LOW);
        digitalWrite(7, HIGH);
        delay(2000);
        digitalWrite(7, LOW);
        digitalWrite(6, HIGH);
        delay(3000);
        digitalWrite(6, LOW);
      }
      else if (BP == 0) {
        digitalWrite(7, HIGH);
        delay(500);
        digitalWrite(7, LOW);
        delay(500);
      }
    }
  }
}

voici mon code mais le else if ne s'execute pas comment faire ?

Get rid of these two lines:

  if (BP == 1) {
    while (true) {

and their corresponding closing braces.