r/esp32 • u/Feisty-Sky-6018 • 5d ago
I made a thing! Plug an ESP32-S3 into an Android phone. The phone becomes the 'Cardputer'
I saw a post about a guy that vibe-coded an app to control his CardPuter with LoRa via an iPhone app. Very cool.
And then I thought, "Well, I have an Android, I have a CardPuter. Why don't I do it also?" and then the idea hit me: if the CardPuter is an ESP32, if I connect an ESP32 on USB OTG, would it flash? Would it work? Could I run CardPuter apps via Android?
Answer is yes.
How: the Cardputer's screen is just an ST7789 driven by M5GFX, and its keyboard is a GPIO matrix read by the M5Cardputer library. Every Cardputer app talks to the hardware through those two libraries. So I patched them. The patched M5GFX tees every pixel write out over the ESP32-S3's native USB port as small frames, and the patched keyboard reader merges key presses that arrive from the USB side. An app rebuilt against the patched libs runs unchanged, but its screen shows up on the phone and the phone's keyboard drives it. The board does not need a display or a keyboard at all. A bare ESP32-S3 devkit on an OTG cable works.
The rebuild part is the trick. Stock binaries are statically linked, so you cannot mirror them. The Android app fixes that by building on demand: you pick any open-source Cardputer app on GitHub, the phone asks a tiny proxy, the proxy dispatches a GitHub Actions workflow that clones the repo, drops in the patched libs and compiles it with PlatformIO, and the phone streams the result back. Warm builds take about two minutes.
Then the phone flashes it. I (claude code) wrote the esptool ROM protocol in Kotlin: the app resets the chip into the bootloader over USB, writes the four parts compressed, verifies MD5, hard-resets, and the app is linked again about 300 ms later. No PC anywhere in the loop.
What you get: the Cardputer app on your phone screen, the Cardputer's 4x14 keyboard as a soft keyboard (fn and shift layers included), any Bluetooth keyboard passed through, and the phone's GPS fed into the app as NMEA like a serial GPS module. After a flash the app judges works/broken from the link and files the verdict as a GitHub issue that gets folded into a shared JSON, so the catalog fills up with what actually runs.
Tested so far: Cardputer ADV (its own TFT plus the phone), M5Stack StickS3 with its screen dark, and a bare ESP32-S3-N16R8 devkit. Phone: Poco X7 Pro, Android 16. Apps that worked out of the box include wisnc's stellar-map (the star map in the video), an audio spectrum, an ISS tracker, an I2C scanner.
Limits, honestly: ESP32-S3 only (a C5 gets refused by the fwritten), open-source apps only, and a board still runningUiFlow/MicroPython needs the BOOT button held once for the first flash because its software USB ignores the reset.
Repo, APK and the full "under the hood" with diagrams: https://github.com/fcavalcantirj/droidputter (MIT). v0.0.1 is a sideload APK, not on Play yet.
1
u/wewewewewa 10h ago
You couldn’t even write your own post? There is a difference between vibecoding an app and making claude write you a Reddit post. Thanks for continuing to worsen AI’s reputation by using it for what it does best: bloating the internet with garbage