#include <Adafruit_NeoPixel.h>
const size_t nbLeds = 9;

Adafruit_NeoPixel strips[] = {
  {nbLeds, 2, NEO_GRB + NEO_KHZ800},
  {nbLeds, 3, NEO_GRB + NEO_KHZ800},
  {nbLeds, 4, NEO_GRB + NEO_KHZ800},
  {nbLeds, 5, NEO_GRB + NEO_KHZ800},
  {nbLeds, 6, NEO_GRB + NEO_KHZ800},
  {nbLeds, 7, NEO_GRB + NEO_KHZ800},
  {nbLeds, 8, NEO_GRB + NEO_KHZ800},
  {nbLeds, 9, NEO_GRB + NEO_KHZ800},
};
const size_t nbStrips = sizeof strips / sizeof * strips;

uint16_t hueDebut[nbStrips];
uint16_t deltaHue = 500;

void setup() {
  Serial.begin(115200);
  for (auto& s : strips) s.begin();
  for (size_t i = 0; i < nbStrips; i++) hueDebut[i] = random(0xFFFF);
}

void loop() {
  // calcul du nouveau contenu
  for (size_t i = 0; i < nbStrips; i++) {
    strips[i].rainbow(hueDebut[i]);
    hueDebut[i] += deltaHue;
  }

  // affichage de toutes les strips
  for (auto& s : strips) s.show();
}