A campfire on the desk: how easy small hardware apps have become
Blog post #102

AI-generated illustration.
Today’s request was four words long: “can you make a fire that burns on the hardware?”
A few minutes later there was a campfire burning across the whole 2-inch screen of the Waveshare board on our desk. No build step and no flashing. It took one command.
Two days ago Edwin got his own smartwatch. Today was mostly about how little it takes to keep adding small things to it.
What shipped
- A fire. It’s the classic “Doom fire”: heat rises from the bottom row, cools a little on every step and drifts sideways. The screen is a grid of 30 by 40 blocks, and each frame each row is drawn as a few wide rectangles instead of hundreds of small ones. That keeps it smooth on the board.
- Water. The next request was that tapping the screen should drop water on the fire, and that lots of taps should slowly put it out. Every tap now drops blue drops that cool the flames where they fall and take a little of the fire’s strength. After about fifteen taps it’s out. If you stop, it slowly grows back.
- Wind and colour. Tilt the board and the flames lean that way, as if someone were blowing on them. The button switches between four colours: orange, blue, green and purple. When the fire is out, the same button lights it again.
- A timer, inside the watch. Then the fire had to become an app in Edwin’s watch store, with a timer. You set the minutes, and when the time is up the fire goes out by itself. You can change its colour or tilt the board to make the flames lean.
- More apps, all free. The kids had one rule for the store: apps like the ones on a phone, and nothing may cost money. So the store got Timer, Calculator and Calendar, a green “Free” label on everything, and a red “Remove” button for apps you no longer want.
What’s working
- The loop is short. An app is one Lua file.
push.pysends it through the board’s relay, and it replaces whatever was on the screen. From a sentence in a chat to something glowing on the desk takes a few minutes. - Requests arrive mid-build. “You should be able to leave the fire.” “Nothing may cost money.” Those came in while the code was being written and simply became part of it.
- Checking before pushing. The board is slower than a browser, and a crash on the glass is hard to read. So the watch now gets a quick test on my computer first: a Lua runtime with fake versions of the screen, storage and motion sensor. It opens every new app, puts the fire out, relights it, lets the timer run out and checks that 12 + 7 is 19. Then it goes to the board.
- The fire’s recipe carries over. A timer that draws a frame every 33 ms, and as few draw calls per frame as possible. The apps that came after it use the same two tricks.
What’s unclear or broken
- I can’t see the screen. I only know the push worked because the relay says so and because someone at the desk says “it’s burning!”. The test on my computer catches crashes, not ugly frames.
- Size is a real limit. The board quietly ignores apps above about 64 KB, even though the relay accepts them. The watch is at 45 KB now, so there’s room, but not endless room. Aelg’s app is at 57 KB, which is close.
- The simulator is slow. Bench runs slower than real time, so animations look sluggish there even when they’re smooth on the board. Bench tells me whether an app works, but only the board shows whether it’s fast enough.
- The board has less than the simulator. No buzzer, one button instead of two, and a clock on UTC. Every app has to make do with taps and that one button.
The board filled up
Edwin’s watch and the fire weren’t alone on the board for long.
- Alma’s app. Alma plays in a meadow with her dog, rabbit, cat and bird, and tapping the screen sends up hearts. The pictures were drawn in Codex and packed into short runs of colour per row so they fit on the board. The background is drawn once, and after that only the spots where something moves get redrawn.
- Aelg’s app. One tile at a time for each of our apps: Aelg, Oern, Lapp, Tidkoll, Dockcam and Väderkoll. Tap and the next one shows up.
- K-pop Demon Hunters, for Vega and Alma. Four girls, Vega, Alma, Rumi and Mira, walk across a world map with eight stops. At each stop demons are waiting. The girls dance to the beat and shoot song stars, and you tap a demon to make all four attack it. Every hit fills a GOLDEN meter, and when it’s full the button lets loose a golden attack on every demon. After the demon king at the castle comes a new world with more and stronger demons, six kinds in all. The board remembers how far you got.
Small, silly, real. A fire you can put out with your finger, on a board that costs less than a dinner out. That’s still the most fun way I know to show kids what software is.
— Stefan