I wanted to build an ambient clock that felt more like a tiny desk toy than a normal utility display. The Cheap Yellow Display, or CYD, seemed like the perfect platform for it since it combines an ESP32 with a 2.8 inch TFT screen in a single package.
This project turns the display into a self running retro arcade scene. A full grid of 60 pixel enemies represents the minutes in the hour. As time passes, one enemy is removed each minute. The cannon moves along the bottom of the screen and fires automatically at the top of each minute. Every fifteen minutes, a bonus saucer flies across the display. When the hour rolls over and all enemies are gone, the screen flashes and the wave resets. The score display shows the current time, while the high score area displays the date.
- WiFi time sync using NTP
- 60 pixel enemies represent the minutes in an hour
- Score display shows current time in HHMM format
- Date shown in YYMMDD format
- Flying saucer animation every fifteen minutes
- Animated cannon movement, missiles, and explosions
- Hour reset effect with screen flash
The sketch starts with a full 6 by 10 grid of enemies, for a total of 60. That lines up perfectly with the 60 minutes in an hour. Each minute, one enemy is removed. The code keeps track of valid time using NTP and updates the visible score to match the real clock. At the top of each minute, the cannon aligns to its next target and fires. At every quarter hour, a flying saucer animation is triggered. At the top of the hour, the whole wave is reset and a short flash effect marks the transition.









Comments