M5 Cardputer ADV
The board as it appears on the Velxio canvas, with its full pin map
read live from the simulator (regenerated by scripts/gen-boards.mjs,
so it always matches what you can wire).

Family: Pro boards · Languages: Arduino C++, MicroPython, ESP-IDF
What is emulated
Section titled “What is emulated”The Cardputer ADV is self-contained: every peripheral lives on the board itself, so its projects need no wiring at all — you place the board and press Run.
| Peripheral | In the emulator |
|---|---|
| 1.14” ST7789 LCD, 240x135 | Rendered live on the board art; drive it with M5Cardputer.Display (M5GFX) |
| 56-key keyboard (TCA8418) | Click the keycaps, or click the board once and type on your own keyboard |
| Speaker (ES8311 codec, I2S) | Plays through your computer’s audio — the exact samples the firmware writes |
| Microphone (I2S RX) | Real sample stream — see the live level meter in the hardware tour |
| microSD | A real FAT image holding the project’s own files; load yours from the SD Card panel |
| BMI270 IMU + battery gauge | Tilt the board and set the charge from the Sensors popover in the canvas header |
| RGB LED | Rendered on the board |
| IR transmitter (G44) | Sends NEC frames; the board flashes the decoded address and command |
The board runs on the free plan, in all three ESP32 languages (Arduino C++, MicroPython, ESP-IDF).
Run your first example
Section titled “Run your first example”The gallery ships thirteen ready-to-run Cardputer ADV projects. Start with LCD + keyboard echo — it does the two things almost every Cardputer project builds on: draw on the LCD and read the keyboard.
1. Open it
Section titled “1. Open it”Go straight to
velxio.dev/example/cardputer-adv-hello,
or browse the examples gallery and type
cardputer in the search box:

2. Look around the editor
Section titled “2. Look around the editor”The project loads with the sketch on the left and the board on the canvas.
There is nothing to wire — the board is the whole circuit. The example also
brings its libraries with it: the Workspace tree on the left shows
sketch.ino next to a libraries.json holding the three the sketch needs
(M5Cardputer, M5Unified and M5GFX), so the first build already has
them.

3. Press Run
Section titled “3. Press Run”Velxio compiles the sketch with the real ESP32-S3 Arduino toolchain in the
cloud (the Output console streams the compiler), then boots the firmware on
the emulated board. The first build of a session takes the longest; after
that, builds come from cache. When it boots, the LCD draws the title and the
Type: prompt:

4. Type on the keyboard
Section titled “4. Type on the keyboard”Click the board once so it owns keyboard focus, then type on your real keyboard — or click the individual keycaps on the board art. Every key you press appears on the LCD; Backspace deletes the last character and Enter clears the line. The emulated TCA8418 controller reports up to three simultaneous keys, exactly as the hardware does.

That is the whole loop. From here, edit the sketch and press Run again — the first project tutorial covers the editor workflow in more depth.
How the sketch works
Section titled “How the sketch works”The complete example is about forty lines:
// M5Cardputer ADV — built-in LCD + keyboard (M5Cardputer library)#include <M5Cardputer.h>
String line;
void setup() { auto cfg = M5.config(); M5Cardputer.begin(cfg, true); // true = init the keyboard M5Cardputer.Display.setRotation(1); // landscape 240x135 M5Cardputer.Display.fillScreen(BLACK); M5Cardputer.Display.setTextColor(GREEN, BLACK); M5Cardputer.Display.setTextSize(2); M5Cardputer.Display.setCursor(6, 6); M5Cardputer.Display.print("Cardputer ADV"); M5Cardputer.Display.setTextColor(WHITE, BLACK); M5Cardputer.Display.setCursor(6, 34); M5Cardputer.Display.print("Type:");}
void loop() { M5Cardputer.update(); if (M5Cardputer.Keyboard.isChange() && M5Cardputer.Keyboard.isPressed()) { Keyboard_Class::KeysState st = M5Cardputer.Keyboard.keysState(); for (auto c : st.word) line += c; if (st.del && line.length()) line.remove(line.length() - 1); if (st.enter) line = ""; M5Cardputer.Display.fillRect(6, 60, 228, 40, BLACK); M5Cardputer.Display.setCursor(6, 66); M5Cardputer.Display.setTextColor(CYAN, BLACK); M5Cardputer.Display.print(line); } delay(5);}Piece by piece:
M5Cardputer.begin(cfg, true)brings up the board; the second argument initialises the keyboard controller. Every Cardputer sketch starts this way.M5Cardputer.Displayis a full M5GFX surface.setRotation(1)turns the panel landscape (240x135);setCursor/setTextColor/printwork like every Adafruit-GFX-style API. The second color argument tosetTextColoris the background, which lets text overwrite itself without flicker.M5Cardputer.update()at the top ofloop()polls the keyboard — without it,Keyboardnever changes.keysState()returns everything held right now:st.wordis the printable characters,st.delandst.enterflag Backspace and Enter. The sketch appends, trims or clearslineaccordingly.- The
fillRect+printpair is the simplest redraw: blank the text area, then print the new line. For flicker-free full-screen drawing, the gallery’s text terminal shows the next step — an off-screenM5Canvassprite pushed in one go.
All Cardputer examples in the gallery
Section titled “All Cardputer examples in the gallery”Ten of the thirteen are M5Stack’s official examples, unmodified — they double as a conformance check for the emulation. In rough learning order:
| Example | What it shows |
|---|---|
| LCD + keyboard echo | The starter above — display plus keyboard in 40 lines |
| Button (official) | The G0 button, with a beep on press and release |
| Single key press (official) | Watch one key via isKeyPressed('a') |
| Multi key press (official) | Up to three simultaneous keys from the TCA8418 |
| Display test (official) | The LCD path at full tilt — random shapes and text forever |
| Buzzer (official) | I2S speaker tones you can hear through your own audio |
| Text input (official) | Line editing with modifiers and an off-screen canvas |
| Text terminal (official) | Scrolling sprite log with a vector font — the end-to-end LCD + keyboard check |
| microSD (official) | Mount, list, create, rename, delete, throughput — on a FAT image you control |
| IR NEC send (official) | NEC frames out of the G44 IR diode, visualised on the board |
| REPL guessing game (official) | A three-file project: console, prompt and command loop |
| Hardware tour | Six diagnostic pages — keys, microSD, IMU tilt bubble, RGB LED, battery, mic meter |
| Brick Blaster | A complete game: sprite rendering, keyboard steering, pentatonic sound |
Start your own project
Section titled “Start your own project”Two ways to begin a Cardputer project of your own:
- New workspace in the toolbar, then pick the M5 Cardputer ADV starter — it loads the LCD + keyboard echo example above as your starting point.
- Or Add Component and search for
Cardputerto place the board on any canvas yourself, then addM5Cardputerfrom the library manager.
Save with the toolbar’s Save button and the project — code, board and the microSD contents — lands in your projects.
Pins (13)
Section titled “Pins (13)”- 3
- 4
- 5
- 6
- 13
- 14
- 15
- 39
- 40
- 5V
- GND
- 2
- 1
Every pin above is clickable on the canvas — click one to start a wire. Board-level behavior, quirks and example links live on the family page.