Add triple-tap lights-off and fix LED pin to D5

- Triple tap turns off LEDs; any subsequent tap or hold resumes the current show
- Change LED_DATA_PIN default from 6 to 5 across config, docs, and wiring diagram
- Fix Makefile upload to pass --input-dir so it uses the pre-built binary

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-24 13:20:36 +02:00
parent ebf01531c5
commit a96f378c9c
5 changed files with 21 additions and 11 deletions
@@ -5,6 +5,7 @@
* A single button navigates between shows:
* 1 tap — next show
* 2 taps — previous show
* 3 taps — lights off (any tap or hold resumes)
* hold — reset to show 0 (blue breath)
*
* To add or update shows:
@@ -28,8 +29,10 @@ static ShowDef s_show; // PROGMEM cache for the active sh
static uint16_t s_step_index = 0;
static uint32_t s_step_start = 0;
static CRGB s_from_color = CRGB::Black;
static bool s_lights_off = false;
static void load_show(uint8_t index) {
s_lights_off = false;
s_show_index = index;
s_show = read_show_def(&SHOWS[index]);
s_step_index = 0;
@@ -76,6 +79,7 @@ void setup() {
s_button.setPressMs(800);
s_button.attachClick([]() { load_show((s_show_index + 1) % SHOW_COUNT); });
s_button.attachDoubleClick([]() { load_show((s_show_index + SHOW_COUNT - 1) % SHOW_COUNT); });
s_button.attachMultiClick([]() { if (s_button.getNumberClicks() == 3) { s_lights_off = true; leds_apply_color(CRGB::Black); leds_show(); } });
s_button.attachLongPressStart([]() { load_show(0); });
}
@@ -87,6 +91,8 @@ void loop() {
if (now - s_last_frame < 16) return;
s_last_frame = now;
if (s_lights_off) return;
Step step = read_step(&s_show.steps[s_step_index]);
CRGB to = CRGB(step.r, step.g, step.b);
uint8_t t8 = step_progress(step, now);