A click on one of the Cardputer Zero's keys drawn under the panel, or on a chip of the lane along the panel's bottom row, types that slot's key. The PicoCalc has no keys drawn, so its chips are where you click. Shift held through the click types the slot's Shift companion. The app reads the bank off the key that arrives, not off the Shift it saw, so the window spells the shifted key itself, the way the desktop's Shift+F-key already was: F6 to F10 on the PicoCalc, xterm's shifted F4 to F8 on the Cardputer. The drawn keys take the lane's own fills, resolved from the deck's styles through the panel's palette, so a key and the chip above it are one colour. They turn blue with the lane while Shift is down, and fill solid while pressed. Losing focus lets go of Shift, which a release in another window never would. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
4.5 KiB
MeshTerm on the Cardputer Zero
Caution
The Cardputer Zero is not supported yet.
MeshTerm has never run on a real Cardputer Zero. Everything on this page was built from M5Stack's published source code and documentation, and tested only in an emulator on a desktop computer. There is no package to install on the device, the screen and keyboard code has never touched the hardware, and the LoRa add-on board is not wired up at all.
Don't buy a Cardputer Zero to run MeshTerm on it. This page will say so when that changes.
M5Stack makes three Cardputers. This page is about the Cardputer Zero: the one with a Raspberry Pi Compute Module 0 inside, running Linux. The original Cardputer and the Cardputer-Adv are ESP32 microcontroller boards; they can't run MeshTerm, and nothing here applies to them.
The device
| Computer | Raspberry Pi Compute Module 0: four 1 GHz cores, 512 MB of memory |
| Screen | 1.9 inches, 320×170 pixels |
| Keyboard | 46 keys, with Shift, Fn and Sym layers |
| System | Raspberry Pi OS "Trixie", with M5Stack's own app launcher |
MeshTerm draws the screen in 53 columns by 14 rows: the same width as on the PicoCalc, but only about half the height, so many screens have a more compact layout here.
The launcher gives an app the whole screen and the keyboard, but no text console to run in. So MeshTerm brings its own: a small program inside MeshTerm that draws every character on the screen itself and reads the keys directly.
Where the work stands
Done, and tested only in the emulator:
- MeshTerm's layout for the 14-row screen: a title bar that also carries the unread count and the battery, one-row tab strips, and dialogs sized for the short screen.
- The row of function-key labels along the bottom of the screen, driven by Fn+4 to Fn+8, the keys that sit right under the display. Shift with them is a second set.
- The program that draws MeshTerm on the screen, and a desktop emulator built on it.
Not done:
- Running on the real device at all.
- A package for M5Stack's app store, so the launcher can start MeshTerm.
- The LoRa radio add-on (see Radios).
- Checking the keyboard on the device. Its layout was read from M5Stack's driver code, and two printings of the keyboard exist.
Trying it in the emulator
The emulator opens a window showing the Cardputer Zero's screen, scaled up so it's readable. Run it with a simulated radio, and you can try the layout without the device or a radio.
It isn't a strict emulator. It doesn't pretend to be the Cardputer Zero's computer: MeshTerm runs on your own computer, at your computer's speed. What it copies is the screen and the keyboard — the screen's size in pixels, the font, the colours, and the keys that drive the labels along the bottom. That's enough to show what fits on the screen and what doesn't, which is what it's for.
It needs MeshTerm installed with pip or pipx (see the README). The one-file downloads leave out the part of Python that opens windows.
Once, fetch the font the screen is drawn in:
meshterm emulate --fetch-fonts
Then start the emulator:
meshterm emulate cardputer-zero --mock
--mock is the simulated radio. Point MESHTERM_HOME at an empty folder first, so its
made-up nodes stay out of your real history. --scale 4 makes the window bigger.
In the window, your keyboard's F4 to F8 stand in for Fn+4 to Fn+8, and holding Shift shows the second set. You can click the keys instead, either the ones drawn under the screen or the coloured keys along its bottom row; hold Shift while you click for the second set. Ctrl+Shift+S saves a screenshot at the screen's real size. Closing the window quits MeshTerm.
Radios
The Cardputer Zero has no LoRa radio built in. Once MeshTerm runs on it, there will be three ways to add one:
| Radio | Status |
|---|---|
| A MeshCore companion on USB | Expected to work as on any Linux computer. |
| A MeshCore companion over Bluetooth | Expected to work as on any Linux computer. |
| M5Stack's Cap LoRa-1262 add-on board | Not wired up. Its pins on the Cardputer Zero are known, but MeshTerm still needs two setup steps it can't do yet: switching on the board's antenna chip, and freeing two of the expansion header's pins from the USB port that shares them. |