FastLED library with click encoder

Поделиться
HTML-код
  • Опубликовано: 5 окт 2024
  • Prototype for battery powered Beauty and the Beast light box. Rotary encoder when rotated will scroll through 9 different static gradient patterns.
    Click it, and it switches over to brightness mode, rotating then changes the brightness.
    Double click and it goes into "party mode". Where it scrolls through a series of 12 dynamic patterns, changing every 15 seconds.
    Hold it down and it lights the top half of the box for 1 second showing a timer is now set. Prototype is set for 10seconds. If before the end of the timer you hold it again, the bottom half of the box lights for a second showing timer deactivated. If timer runs out, all LEDs are turned off, then a MOSFET cuts power to the strip(even with LEDs off, the 16LEDs draw 7ma of power), after that, the Arduino itself shuts itself down, going from drawing 12.0ma to 0.005ma.
    Every 15 seconds the program writes whatever pattern is being displayed and whatever the current brightness is to two EEPROM addresses. So, when the box is powered back up, it will resume whatever it was set to when it was shut down.
    PasteBin for the code:
    pastebin.com/E...

Комментарии •