Tempura
One repository, several firmwares for spare ESP32 boards. It is a playground and learning tool that lets me make use of a bunch of electronics components I have stashed away.
Why
I have a drawer of boards, displays, sensors and bits that I bought for a project and never used. Rather than start a new project for each, there is one codebase with a shared core, so trying a part means writing one small file and flashing it.
What it does
Each firmware is built for the board in hand and picked by name. Every one keeps Wi-Fi, a status page and over-the-air updates, so any build can be replaced without a cable.
- base: the status page and nothing else.
- jarvis: a microphone node that streams audio over the network.
- sdwriter: a raw microSD image writer that writes a whole operating-system image to a card over Wi-Fi, plus card diagnostics.
- parts: a tester for LEDs, a buzzer and a 16 by 2 LCD, driven from a web page.
- battest: a battery run-time test that logs once a minute, sleeping between readings.
The boards include a classic WROOM32, a newer ESP32-C3, and one WROOM32 with a damaged USB power path that can only be run from 5 V on its VIN pin.
Under the hood
- A PlatformIO project in C++ on the Arduino core. A build is named firmware-board, and only combinations that work exist.
- A shared core handles Wi-Fi with retry and a reboot after ten minutes without it, a watchdog, mDNS naming, over-the-air updates and a JSON status. A firmware is one file that fills in a few hooks.
- The page styling is shared with the ESP32 pages in Power Dash, so the two look like the same family.
- A push script sends a build over the air and checks that the device comes back running the new image.
- The SD writer manages about 370 KB/s over TCP. The limit turned out to be the Arduino core's small TCP receive window across a Wi-Fi round trip, not the card or the SPI bus.
A personal playground. Some firmwares are one-off tools for a single job and are not meant to be reused.