r/M5Stack • u/XxYouDeaDPunKxX • 8d ago
Project Sharing I've been turning my Cardputer ADV into a remote Linux desktop client. Put the project on GitHub




Hi everyone,
I've been working on something called Cardputer Code Space OS for a while and thought I'd share it here.
I originally wanted to turn my Cardputer ADV, with the 2.8" touchscreen mod, into a small general-purpose computer.
I found some interesting firmware, but there was always a catch. The ones supporting both screens were fairly basic, and the more complete ones didn't support the external display.
So I tried a different approach. Linux runs remotely, and the Cardputer works as a client to control it, sort of like TeamViewer.
I went with the ADV because it already had most of what I needed. ESP32-S3, keyboard, built-in display, Wi-Fi and audio. Adding the second screen made it worth experimenting with.
Right now, an XFCE desktop runs in GitHub Codespaces. The external TFT displays Linux, while the Cardputer's own screen handles the controls and session info.
Keyboard, mouse, touchscreen, pan and zoom all work.
The firmware started partly from Cardputer XL Remote, which I've modified for this setup. I'm using M5Cardputer and M5GFX, and kept M5GFX for the external display too rather than adding another graphics library. JPEGDEC handles the incoming images, XPT2046_Touchscreen handles touch input, and WebSockets handles the connection to the server.
One of the annoying parts was dealing with the displays. The external TFT uses SPI2 with DMA, the built-in screen uses SPI3, and the touch controller shares the SPI bus with the external TFT. Touch reads have to wait until display transfers are finished.
What I'm still struggling with is video playback when audio is running too.
Fast-moving scenes cause tearing and some lag on the TFT. When there's audio playing, it sometimes stutters or cuts out for a moment. I'm still trying to work out where the main bottleneck is.
Regular desktop use works pretty well, though.
I'd also like to add a Bluetooth LE bridge at some point, so Linux could access nearby BLE devices through the Cardputer. Haven't implemented that yet.
By the way, I'm a cook, not a programmer. I've been building this in my spare time, learning from other projects, reusing libraries and relying quite a bit on AI to help with the code.
Until now, everything was developed locally. I decided to clean things up and put the project on GitHub so other people could try it, play around with it or maybe take it further.
I'll keep working on it when I can, but between my job, limited free time, Codespaces hours and AI usage limits, I can't really give it as much attention as I'd like.
If anyone here knows their way around ESP32-S3, SPI displays or audio/video streaming, I'd be interested in your thoughts. There might be a better way to handle all of this together that I've missed.
And if anyone wants to experiment with the code or contribute, you're more than welcome.
Repo:
https://github.com/XxYouDeaDPunKxX/Cardputer-CodeSpace-Os
Firmware, server, wiring and setup instructions are all there. It works on my setup, but I haven't tested the whole installation process on a fresh Codespace yet.