cardputer-buddy

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Cardputer Buddy app bundle

Cardputer Buddy应用包

The
buddy/
directory in the local
build-with-claude
clone is the MicroPython payload that
m5-onboard
installs onto
/flash/
. Work inside that clone.
本地
build-with-claude
克隆仓库中的
buddy/
目录是
m5-onboard
安装到
/flash/
的MicroPython payload。请在该克隆仓库内进行操作。

Device layout

设备布局

/flash/
├── main.py              launcher menu (replaces UIFlow's boot flow)
├── buddy_*.py           shared libs (BLE, UI, state, protocol, chars)
├── burst_frames.py      sprite frames
└── apps/
    ├── claude_buddy.py  BLE client → Claude Desktop's Hardware Buddy
    ├── hello_cardputer.py
    └── snake.py
main.py
scans
/flash/apps/
at boot and lists every
.py
as a menu entry. Drop a file into
buddy/device/apps/
, push it, and it appears on next boot.
/flash/
├── main.py              启动器菜单(替代UIFlow的启动流程)
├── buddy_*.py           共享库(BLE、UI、状态、协议、chars)
├── burst_frames.py      精灵帧
└── apps/
    ├── claude_buddy.py  BLE客户端 → Claude Desktop's Hardware Buddy
    ├── hello_cardputer.py
    └── snake.py
main.py
会在启动时扫描
/flash/apps/
,并将每个
.py
文件列为一个菜单项。将文件放入
buddy/device/apps/
,推送后,下次启动时它就会出现在菜单中。

Adding an app

添加应用

Crib from
buddy/device/apps/hello_cardputer.py
— smallest example of keyboard polling, font, and exit conventions. Then push without re-flashing:
bash
python3 onboard/scripts/install_apps.py --port <PORT> --src buddy
<PORT>
is whatever
detect.py
reported last run (e.g.
/dev/cu.usbmodem1101
,
/dev/ttyACM0
,
COM3
).
参考
buddy/device/apps/hello_cardputer.py
——这是包含键盘轮询、字体和退出约定的最小示例。然后无需重新烧录即可推送:
bash
python3 onboard/scripts/install_apps.py --port <PORT> --src buddy
<PORT>
是上次运行
detect.py
时报告的端口(例如
/dev/cu.usbmodem1101
/dev/ttyACM0
COM3
)。

Dev loop tooling (
buddy/scripts/
)

开发循环工具(
buddy/scripts/

bash
undefined
bash
undefined

Push a subset of files over USB-serial

通过USB串行推送部分文件

python3 buddy/scripts/push.py --port <PORT> --files apps/snake.py
python3 buddy/scripts/push.py --port <PORT> --files apps/snake.py

Watch device logs

查看设备日志

python3 buddy/scripts/tail_serial.py --port <PORT>
python3 buddy/scripts/tail_serial.py --port <PORT>

One-shot REPL exec

一次性REPL执行

python3 buddy/scripts/repl_run.py --port <PORT> --script "import os; print(os.listdir('/flash'))"
undefined
python3 buddy/scripts/repl_run.py --port <PORT> --script "import os; print(os.listdir('/flash'))"
undefined