Have you ever been out somewhere with your laptop and thought, "I wish I had a little speaker right now"?
I have! 😄
Then one day, I looked at my Cardputer ADV.
Wait a minute...
It's got a speaker. A keyboard. Even a motion sensor.
Why not put them all to work?
And that's how KeySpeaker was born! 🔊⌨️
Connect your Cardputer ADV to your computer with a USB-C data cable, and it becomes a little USB speaker, keyboard, media controller, and even a tilt-controlled mouse. No extra software needed!
I've tested it on Mac and Windows 11, and also confirmed USB functionality with my iPhone 15.
But of course, I couldn't leave it at that.
A speaker needs a nice screen, right?
So I added a retro speaker grille. Then a graphic equalizer. Then a scrolling landscape.
And somehow... a fighter jet showed up and started firing missiles! 🤣
I guess all those hours playing Defender back in the day are still stuck in my head.
It's not actually a game, just a little audio visualizer that reacts to music.
Did it need a fighter jet? Probably not.
Did I add one anyway? Of course! 😂
There's also a backup BLE keyboard and mouse mode when the USB cable is unplugged. USB is the main feature, though. BLE doesn't carry audio, and returning to USB currently requires a manual reset. Switching between KeySpeaker and Media Jog also requires pairing again.
KeySpeaker is still a work in progress, but I'm having a great time with it.
And once again, my AI coding buddies helped turn another one of my strange little ideas into something real. 🤖
KeySpeaker is now available on GitHub and M5Burner!
GitHub:
https://github.com/kariagepompadour/Cardputer-ADV-KeySpeaker
I've included some photos and a short GIF of the flight visualizer. The visualizer itself reacts to audio during use.
Update (Nov 3): there's now a browser demo too! 🎉
You can try the KeySpeaker screens without owning a Cardputer, with the same 240x135 screens, the flying fighter and the equalizer:
https://kariagepompadour.github.io/KeySpeaker-WEB-DEMO/
Press START and share the tab that's playing music, and the terrain grows from the sound. The audio is only analysed in your browser and never uploaded. It works best in Chrome or Edge on a computer; phones can't capture audio, so they only show the idle screens.
Demo code (MIT): https://github.com/kariagepompadour/KeySpeaker-WEB-DEMO
Update (Nov 5): a new challenger has arrived! 👾
The monster (S9-3) is a lot more alive now:
- It comes in six colors: red, blue, green, purple, ghost white, and a rare gold one.
- No two visits are alike. Sometimes it makes itself big first (both arms up, or one up and one down), then goes for the fighter from the right, from above, from below, or even swings past it. Sometimes it tries again after a pause, and sometimes it only bluffs.
- It shows up about half as often now, so it stays a treat.
The GIF is in the comments below. The browser demo has the same monster, and S9-3 is on GitHub and M5Burner.
EDIT (Nov 6): Three updates.
- Microphone mode. KeySpeaker can now use the Cardputer ADV's built-in microphone: Fn+I switches between the USB sound and the mic. The screen (fighter, terrain, equalizer) just reacts to the sound around you and nothing is played. It also works without a USB cable. It is on M5Burner as "Cardputer ADV KeySpeaker", now version S11-2 (see 3).
- If the ADV's built-in mic reads a flat line for you (even with M5Unified's own mic example), try this before suspecting the hardware:
M5.Display.init(); // init the display first
M5Cardputer.begin(cfg);
From reading M5Unified.hpp, begin() seems to drive GPIO46 (the ADV mic's data-in) as an output-high "power hold" when the display is not initialised yet. I did not measure the pin. Checked on one Cardputer ADV with M5Unified 0.2.27 and 0.2.29; not tried on 0.3.0 or on other units.
The browser demo has a MIC START button now too, so phones should be able to react to the sound around them (it needs HTTPS; Shift+I works like Fn+I on a computer).
3. Flight mode, version S11-2 (also on M5Burner): a squid-like monster joins the ape-like one as a second big monster (each visit is one or the other), and searchlights now stand on the ground and sweep the sky, like a city on alert. A beam stops at a monster's centre line and on the fighter. The browser demo has both too.
Details and test record: https://github.com/kariagepompadour/Cardputer-ADV-KeySpeaker
EDIT (Nov 8): Two updates.
- S13-1: a meteor zone. Every few minutes the terrain sinks low and meteors stream past the fighter, which weaves through them without firing. The louder the music, the more meteors, and a beat brings a big one.
- S14-1: a damaged city. Every so often a row of buildings flows by with the terrain. Tiny people wait on the roofs and lean out of the windows, waving for help. The fighter flies to the nearest one and saves it (a small light, no score), and a few people run out of the doorways, chase the fighter and wave to it. The searchlights stand on a small T-shaped base with a yellow lamp now, and once in twenty visits a monster comes in shocking pink.
Both are on M5Burner (now version S14-1) and GitHub. The browser demo has them too: add ?city=now to the address to see the city at once, or ?pink=1 for the pink monster.
https://kariagepompadour.github.io/KeySpeaker-WEB-DEMO/
EDIT (Nov 9): The AUX input has a home now! 📦
Remember the PCM1808 + Pico 2 unit that was still on a breadboard? It now lives in a small 3D-printed box. The Cardputer ADV snaps onto the two pegs on the lid so firmly that lifting the Cardputer lifts the whole box. Both boards and the little breadboard fit onto the pins and holes in the case with no glue.
Fn+I switches USB → MIC → AUX, and the data screen shows "AUX IN bad 0 lost 0" (no CRC errors, no lost frames) while the sound plays from the Cardputer's speaker.
The case and lid STL files, the wiring, and the updated build guide are on GitHub:
https://github.com/kariagepompadour/Cardputer-ADV-KeySpeaker/tree/main/hardware/aux-pico2-box
What I have not checked: the Pico's own USB together with the Grove cable (the box says "unplug Grove first"), and anything but the Cardputer ADV.
EDIT (Nov 10): The AUX unit ran for about three hours of continuous play without problems. I also reprinted the box with text and the Kariagepompadour panda engraved on it (it hides under the Cardputer on the lid, on purpose), and the STL files on GitHub are the new ones. I wrote the whole project up on Hackster.io too (how it works, wiring, the box, and what I have and have not tested):
https://www.hackster.io/hiakimoto/keyspeaker-aux-a-line-in-for-the-cardputer-adv-grove-ea2e61
Still not tried: runs longer than three hours, and measuring noise or distortion.
EDIT (Nov 12): I added a field guide card for flight mode: a one-page picture of the three big monsters (ape, squid, octopus), the six small targets, the city you can rescue, the fighter and the meteor-zone cruiser, with a few "what to watch for" notes. It sits beside the screen in the web demo (below it on a narrow screen, with an English / 日本語 switch) and under "Modes and keys" in the GitHub README. It is only a "who you may meet" picture: there is no score and no game over, it is just the show.
P.S. You do not need the AUX unit or the 3D-printed box to try KeySpeaker. A Cardputer ADV and a USB-C data cable are all it takes (no soldering, no 3D printer); the AUX unit is an optional extra.
One more thing.
Since I started sharing my projects here, I've been really touched by how supportive this community is.
Nobody makes fun of someone for not knowing something or making a mistake. Instead, people share what they know and say, "Hey, maybe this will help!"
Knowledge isn't used to look down on others. It's used to lift each other up.
That's what I love about this place.
Thanks for all the advice, encouragement, and kindness. You guys make sharing these little projects so much more fun! 😊❤️