THE IDEA
I wanted a tiny desk gadget that would earn its place even when the PC is switched off. A clock was the obvious answer, but a plain clock is boring. So every minute change became a small game event, played out on a 128x64 1-bit screen, the kind of resolution that 80s handhelds and early home computers had to live with.
THE CONSTRAINT IS THE FUN PART
- 128x64 pixels, 1 bit per pixel: the whole frame is 1024 bytes
- No sprite sheets and no bitmaps: every character is drawn procedurally from rectangles, pixels and lines
- The Asteroids clock is pure vector: drawLine only, delta-time physics, screen wrap
- The frame is pushed over I2C at about 35 fps, so the animation has to work within that budget
- Idle animations run all minute long, and at second :56 the "event" starts, so the new digit lands on time
THE CLOCKS
- Mario: Mario walks in and jumps to bump each changed digit. Optional idle encounters: he stomps Goombas and fireballs Spinies between minutes
- Space Invaders: an invader patrols, then lasers the changed digit, which explodes with gravity-driven debris
- Arkanoid: Breakout-style ball physics knock digits out and rebuild them
- Pac-Man: digits are made of pellets, and Pac-Man eats them before the new digit bounces in
- Snake: a Nokia-style snake roams around the digits. Changed digits crumble into food that it hunts down
- Tetris: block-grid digits are rebuilt with drop-in slabs or falling dots, and tetrominoes tumble in the background
- Asteroids: the wireframe ship drifts with inertia and splits rocks, then shoots digits into spinning line shards
- Dino Runner: the Chrome T-Rex jumps cacti, and a pterodactyl snatches the old digit while the new one drops in
- TRON: two light cycles duel with trails, and one retraces the new digit stroke by stroke
- Plus Standard, Large and a Cycle All mode
HARDWARE
- ESP32-C3 (SuperMini module, or my own 27x27 mm carrier PCB)
- 0.96" SSD1306, 1.3" SH1106 or 1.54" CH1116 128x64 I2C OLED
- Optional TTP223 touch button: tap to switch modes or cycle clocks, hold to dim an LED night light
- 3D-printed case with Space Invaders and Pac-Man ghost inlays
WHEN THE PC IS ON
A companion app (Windows/Linux) reads sensors from LibreHardwareMonitor and streams them over UDP. You pick which metrics to show, with labels, progress bars and layout set from the web UI. It can also stream audio for a spectrum or oscilloscope visualizer. When the PC shuts down, the device falls back to the clock by itself, using NTP time with automatic DST.
SOFTWARE
- Firmware: C++ / PlatformIO, Adafruit GFX
- Web config page served by the device itself, plus JSON export/import and OTA updates
- HTTP API for Home Assistant / Node-RED (switch clock style, dim, force a mode)
- Browser flasher: no toolchain needed, just Chrome or Edge over USB
LINKS
Source: https://github.com/Keralots/SmallOLED-PCMonitor
Web flasher: https://smalloled.stolaris.dev/
Video:
Keralots