#include <FastLED.h>
#define NUM_LEDS 8
#define DATA_PIN 3
#define DATA_PIN 2
CRGB leds[NUM_LEDS];
const int unBouton = 2;
void setup () {
FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
pinMode(unBouton, INPUT_PULLUP);
}
void loop(){
for (int i = 0; i<=8; i++) //incrémente toutes les leds
leds[i] = CRGB::Yellow;
FastLED.show();
}
void loop2(){
if (digitalRead(unBouton)){
for (int i = 0; i<=8; i++) //incrémente toutes les leds
leds[i] = CRGB::Green;
FastLED.show();
}
}