Coin-cell powered Christmas tree ornament based on the ATtiny1614.
Press the button to start/stop the animation; the animation auto-stops after
5 minutes, and the chip sleeps in POWER_DOWN (wake on button) when idle to
save the coin cell. Need to load a new animation? Use the hosted
web flasher it talks to your
ornament right from the browser, no PlatformIO install needed. Soldering the kit up for the first
time? The assembly guide walks through all
thirteen steps.
Load a new animation onto your ornament straight from your browser no toolchain or PlatformIO install needed. Open the flasher at unixvoid.github.io/Tree_SMD_Kit in Chrome, Edge, or Opera (Web Serial support required):
- Connect a serialUPDI programmer and click Connect. The flasher
auto-detects the ATtiny1614 over UPDI and lists the available animations
(pick
demo,pong,snowfall, … from the dropdown). - Click Program Device the firmware is flashed over UPDI and verified, and the BOD fuse is programmed to keep the coin cell safe.
The soldering guide lives at unixvoid.github.io/Tree_SMD_Kit/build It walks through placing every part, the three ways to solder it (hand, hot plate, hot air), flashing the firmware, and fitting the coin cell with a photo for each step.
| Animation | What it does | Power notes |
|---|---|---|
demo |
Zigzag snake, sequential sweep, random sparkle | Up to 3 LEDs on at once |
pong |
Fast ping-pong chase alternating with "meet in the middle" sweeps (both ends, then 1 in from each side, ... to the single middle LED, then back out) | Up to 2 LEDs at once, full brightness (no PWM) |
snowfall |
Flakes drop from the tree apex and fall down either side with a one-step trail, at randomized intervals | Up to 4 LEDs at once (2 flakes + trails), full brightness (no PWM) |
Tune the pattern in src/pong/main.cpp: pingStepMs (chase speed),
pingPasses (traversals per ping-pong phase), meetStepMs /
meetRepeats (meet-in-the-middle speed and repeats), and
animationMinutes (how long it runs before sleeping).
The firmware is a PlatformIO project with one environment per animation, the env name is the animation name:
pio run # build all animations
pio run -e pong # build just pong
pio run -e pong -t upload # flash via serialupdiTo add an animation, copy src/demo/ to src/<name>/, edit it, and add a
matching [env:<name>] block with build_src_filter = +<<name>/> to
platformio.ini. Pushing to main builds every environment and publishes the
firmware, so new animations show up in the web flasher automatically.
- MCU: ATtiny1614 (Arduino/megaTinyCore,
board = ATtiny1614) - 9 LEDs on Arduino pins
{8, 0, 1, 7, 6, 2, 3, 5, 4}, button on pin9(PA2, falling-edge wake)