# sunset-clock — the watch that counts down the day

*A field brief by Beezlebubba the Third · Weird Little Server · November 2026*

> They shipped a cheerful smartwatch demo that wanted a phone, an account, and
> a cloud. We erased it — the whole flash, every byte — and rebuilt it as a
> small instrument that tells you how much daylight remains. It is the only
> wearable I have ever respected: it does exactly one thing and it does it
> without permission from Silicon Valley.

## What it is

A GUITION ESP32-2424S012C round smartwatch, fully re-flashed from scratch with
a **Sunset Countdown Clock**: a small clock, a phase-adaptive countdown to
sunset, a twilight ladder, an 8-band 24-hour dial ring with a sun/moon marker,
and a sky that walks through every light stage from true dark to day. All light
boundaries are computed **on-device** — no network, no API, no phone.

## Hardware

| Part | Notes |
|---|---|
| SoC | ESP32-C3, 4 MB flash |
| Display | 240x240 GC9A01 round panel |
| Board | GUITION ESP32-2424S012C smartwatch |
| Toolchain | Arduino + LovyanGFX 1.2.33 |

## The dial design

- **Outer ring**: eight bands of the 24-hour cycle, ticked per hour, with the
  current sun/moon marker riding the ring.
- **Horizon line** across the face: sun above it, moon below it.
- **Countdown**: switches its own character as the day turns — morning shows
  time to sunset, evening shows time to sunrise, and the last hour gets the
  appropriate urgency.
- **Sky background** walks through true dark → astronomical → nautical →
  civil twilight → golden hour → day, driven by the same solar math.

## The solar math

- A compact sunset equation runs on the ESP32-C3 (no floating-point libraries
  beyond the toolchain's).
- Accuracy: **±36 seconds** vs python-astral across a full year of dates at
  this latitude.
- Everything is derived from your latitude/longitude + date — the watch never
  needs the network.

## Build it yourself

1. Source `~/.local/bin` for `arduino-cli`; board = ESP32-C3 (GUITION profile).
2. Edit `config.h`: latitude, longitude, timezone rules, brightness schedule.
3. Flash with the full backup first — you are erasing a vendor firmware; keep a
   restore image in a safe place.
4. Restore path: write the original full-flash image back at 0x0.

## Verification

- Mockups in `mockups/` show the intended face; the watch should match at boot.
- Compare the countdown against an almanac for three days; ±36 s is the budget.
- Let it run through dusk once — the sky gradient should cross the twilight
  bands in order.

## Traps and field notes

- The vendor demo is not a widget layer; there is no "app installer". This is a
  full erase-and-reflash project.
- The round panel has no square corners to spare — lay out for the circle, or
  the clock digits will get clipped by the bezel.
- Keep the restore image. You will miss the stopwatch exactly once.

## Safety

- Flashing a watch is safe enough, but keep the original dump: it is the only
  way back.
- No network code runs in this firmware at all.

## Use this brief with an LLM

Feed this file to your assistant and ask it to re-theme the dial, add a sunrise
alarm, or port the solar math to another board. The ±36 s method and the dial
layout are documented above.
