Leds strip/Projet phares arrière. Problème code pour clignoteur

Toinit:
j'abandonne tout court

Si on l'ecrit Pour vous vous n'aurez rien appris... Faut batailler. Et quand vous aurez votre premier programme perso fonctionnel vous serez super content!

allez pour vous aider à avancer, jetez un oeil sur ce code: j'ai simplement conservé ma structure de code ci dessus et remplacé la lecture des pixels dans le tableau par la lecture de leur couleur dans la bande. j'ai tapé cela ici, je ne sais même pas si ça compile et encore moins si ça va fonctionner. à vous de creuser

#include <simpleBouton.h> // http://forum.arduino.cc/index.php?topic=375232.0
#include <Adafruit_NeoPixel.h>

const byte NUMPIXELS  = 5;

Adafruit_NeoPixel pixelsClignoGauche = Adafruit_NeoPixel(NUMPIXELS, 5, NEO_RGBW + NEO_KHZ800);
Adafruit_NeoPixel pixelsClignoDroit = Adafruit_NeoPixel(NUMPIXELS, 6, NEO_RGBW + NEO_KHZ800);

uint32_t noir, vert;
const byte pin_ClignoGauche = 2;
const byte pin_ClignoDroit = 7;

simpleBouton boutonGauche(pin_ClignoGauche); //Cablage : pin---BP---GND (le bouton sera en INPUT_PULLUP)
simpleBouton boutonDroite(pin_ClignoDroit); //Cablage : pin---BP---GND (le bouton sera en INPUT_PULLUP)

enum : byte {REPOS, CLIGNOTE_GAUCHE, CLIGNOTE_DROITE} etat;

unsigned long chrono;
const unsigned long periodeClignotement = 1000ul; // ici 1s pour qu'on voit ce qu'il se passe, 20ul pour 20ms

void afficherPixels()
{
  pixelsClignoGauche.show();
  pixelsClignoDroit.show();
}

void etapeSuivante(Adafruit_NeoPixel& bandeDePixel)
{
  int unPixel;

  for (unPixel = 0; unPixel < NUMPIXELS; unPixel++)
    if (bandeDePixel.getPixelColor(unPixel) != noir) break; // on en a trouvé un allumé

  if (unPixel == NUMPIXELS) bandeDePixel.setPixelColor(0, vert); // allumé s'ils sont tous éteint c'est qu'on commence
  else {
    // si le premier pixel est allumé et pas le dernier c'est qu'on "monte"
    if ((bandeDePixel.getPixelColor(0) != noir) && (bandeDePixel.getPixelColor(NUMPIXELS - 1) == noir)) {
      // on cherche le premier pas allumé et on l'allume
      for (unPixel = 0; unPixel < NUMPIXELS; unPixel++) {
        if (bandeDePixel.getPixelColor(unPixel) != noir) {
          bandeDePixel.setPixelColor(unPixel, vert); // allumé
          break;
        }
      }
    } else {
      // c'est qu'on descend
      // on cherche le premier allumé et on l'éteint
      for (unPixel = 0; unPixel < NUMPIXELS; unPixel++) {
        if (bandeDePixel.getPixelColor(unPixel) != noir) {
          bandeDePixel.setPixelColor(unPixel, noir); //éteint
          break;
        }
      }
    }
  }
  // on rend visible notre modif
  afficherPixels();
}

void mettreAuRepos()
{
  pixelsClignoGauche.clear();
  pixelsClignoDroit.clear();
  etat = REPOS;
  afficherPixels();
}

void actualiserLesBoutons()
{
  boutonGauche.actualiser();
  boutonDroite.actualiser();
}

void setup() {
  Serial.begin(115200);
  pixelsClignoGauche.begin();
  pixelsClignoDroit.begin();
  noir = pixelsClignoGauche.Color(0, 0, 0);
  vert = pixelsClignoGauche.Color(80, 255, 0);
  mettreAuRepos();
}

void loop() {

  // on teste les boutons
  actualiserLesBoutons();

  // on prend une décision
  switch (etat) {
    case REPOS:
      if (boutonGauche.estEnfonce()) {
        chrono = millis();
        etapeSuivante(pixelsClignoGauche);
        etat = CLIGNOTE_GAUCHE;
      }
      else if (boutonDroite.estEnfonce()) {
        chrono = millis();
        etapeSuivante(pixelsClignoDroit);
        etat = CLIGNOTE_DROITE;
      }
      break;

    case CLIGNOTE_GAUCHE:
      if (boutonGauche.vientDEtreRelache()) mettreAuRepos();
      else if (millis() - chrono >= periodeClignotement) {
        etapeSuivante(pixelsClignoGauche);
        chrono += periodeClignotement;
      }
      else if (boutonDroite.vientDEtreEnfonce()) {
        mettreAuRepos();
        chrono = millis();
        etapeSuivante(pixelsClignoDroit);
        etat = CLIGNOTE_DROITE;
      }
      break;

    case CLIGNOTE_DROITE:
      if (boutonDroite.estRelache()) mettreAuRepos();
      else if (millis() - chrono >= periodeClignotement) {
        etapeSuivante(pixelsClignoDroit);
        chrono += periodeClignotement;
      }
      else if (boutonGauche.vientDEtreEnfonce()) {
        mettreAuRepos();
        chrono = millis();
        etapeSuivante(pixelsClignoGauche);
        etat = CLIGNOTE_GAUCHE;
      }
      break;
  }
}