Theor's ESP32 Gadget Is a Love Note to Feature Creep and Demoscene Technology

What started off as a simple messaging tool has become so much more, with yet more features planned.

Pseudonymous developer "theor" has built an unusual device, powered by an Espressif ESP32, which began life as a simple message board and ended up with functions lifted straight from the demoscene of the 1980s and 1990s.

"At first, I had a simple goal," theor explains. "Use an ESP32 (240mhz, 512k RAM, luxury!) and a SSD1306 display (128×64, monochrome). Use the ESP Wi-Fi to change the message remotely. That was easy enough: the SSD1306 is supported by the Adafruit-GFX library, which makes simple rendering trivial."

The idea was to build a device that could be used to leave love notes for his girlfriend, but — as is so often the case — the project almost immediately entered into scope-creep. An initial setup to pull messages from a GitHub repository was switched out for an on-board web server for direct editing; a capacitive button was added to wake the device from sleep; and soon theor's attention was drawn to the presentation of the messages themselves.

"I then started experimenting with fancier scenes," he explains. At first, particles showering the message, then I got into animations and… At this point, the flashing time got into the 40s range. To iterate on animation timing and sprite positioning, it’s less than ideal; working at Unity, it’s like having to recompile the engine when moving an object."

The solution, having experimented with WebAssembly, was the creation of a desktop simulator which would allow for rapid iteration through tests without the 40-second-plus flash times of the real hardware. Then the idea of using tracker technology to offer greater control over the animation system: "Years ago, I stumbled upon GNU Rocket, which is a 'sync-tracker,'" theor explains, "a kind of primitive video editing tool."

"At authoring time, the Rocket client will connect to an editor, in which you can scrub time and edit values. From the editor, you can then send an 'export' command. It will save the data, in my case on the [ESP32] SPIFFS file system."

At this point, the gadget needed a display upgrade — moving from the single-color panel of the original build to a 16-bit OLED offering a 128×128, used to display 4-bit indexed bitmaps using a 16-color per-bitmap palette and supporting palette cycling, a trick often used in vintage games to cheaply add animation to an otherwise static image, for another layer of animation.

The finalized build — at least, until its creator realizes a plan to add sound — can be seen in its custom laser-cut housing on theor's blog.

Gareth Halfacree
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire:
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles