#include /*==========variables LED*/ constexpr uint8_t NBR_LED = 40; constexpr uint8_t DATA = 27; constexpr uint8_t CLOCK = 26; constexpr uint8_t BRIGHTNESS = 255; CRGB leds[NBR_LED]; /*===========commutateur ambiance*/ constexpr uint8_t AMBIANCE_CHECK = 22; /*============on:off*/ constexpr uint8_t ON_CHECK = 23; /*===========animation aller-retour*/ void loadingAnimation(){ for(int i = 0; i(leds, NBR_LED); FastLED.setBrightness(BRIGHTNESS); FastLED.clear(); leds[3] = CRGB::Red; FastLED.show(); FastLED.clear(); pinMode(AMBIANCE_CHECK, INPUT_PULLUP); pinMode(ON_CHECK, INPUT_PULLUP); } void loop(){ if(digitalRead(ON_CHECK)==LOW){ if(digitalRead(AMBIANCE_CHECK)==LOW){ loadingAnimation(); } else{ allBright(); } } else{ FastLED.clear(); } }