// attention importer Toggle AVANT FastLED sinon il y a conflit sur un enum
#include <Toggle.h>
#include <FastLED.h>
const byte brocheBouton = 3;
const byte brocheBandeau = 2;
const byte nbLeds = 64;
CRGB leds[nbLeds];
Toggle bouton;
void setup() {
FastLED.addLeds<WS2812B, brocheBandeau, GRB>(leds, nbLeds);
Serial.begin(115200);
bouton.begin(brocheBouton);
}
void loop() {
bouton.poll();
if (bouton.onPress()) {
fill_rainbow(leds, nbLeds, 0, 3);
FastLED.show();
} else if (bouton.onRelease()) {
fill_solid(leds, nbLeds, CRGB(0x000000ul));
FastLED.show();
}
}