# SMASHR wiring

![Wiring diagram](wiring.svg)

| From | To | Wire |
| --- | --- | --- |
| XIAO `5V` | LED strip `+5V`, 74AHCT125 `VCC` (pin 14), capacitor `+` | red |
| XIAO `GND` | LED strip `GND`, 74AHCT125 `GND` (pin 7) and `1OE` (pin 1), capacitor `-`, switch `COM` | black |
| XIAO `D1` (GPIO2) | 74AHCT125 `1A` (pin 2) | white |
| 74AHCT125 `1Y` (pin 3) | 330 ohm resistor, then LED strip `DIN` | white |
| XIAO `D0` (GPIO1) | switch `NO` | white |

The switch input uses the ESP32's internal pull-up: idle reads HIGH, a press pulls it to GND.
Debounce is done in firmware (25 ms stable).

Keep the data run from the resistor to the first pixel under 10 cm. Put the 1000 uF capacitor as close to the
strip's power input as you can.

Power comes in through the XIAO's USB-C, which pokes through the cut-out in the base tray.
