Cardputer-Adv MicroPython アプリバンドル(Claude Buddy、Snake、Hello)の開発・改善を行うスキルです。m5-onboard でデバイスを初期設定した後、さらに機能を追加・修正する際に使用します。 **次のような場合に使用:** - ユーザーが新しいアプリを追加したい - 変更した Python ファイルを1つだけデバイスに送信したい(デバイス全体の再書き込みなしで) - デバイスのシリアルログ(リアルタイムの動作記録)を確認したい - デバイス上で単発のコマンドを実行したい - /maker-setup 実行後の続き作業 **起動キーワード:** 「アプリを追加」「Cardputer に送信」「デバイスのログを表示」「デバイスで実行」など、またはメーカー向けセットアップ後の関連作業
Iterate on the Cardputer-Adv MicroPython app bundle (Claude Buddy, Snake, Hello) after the device is already provisioned via m5-onboard. Use when the user wants to add a new app, push a single changed .py without re-flashing, watch device serial logs, or run a one-shot REPL command. Trigger on "add an app", "push to the cardputer", "tail the device", "run on the device", or follow-up work after /maker-setup.
ローカルの build-with-claude クローン内にある buddy/ ディレクトリは、m5-onboard が /flash/ にインストールする MicroPython ペイロードです。作業はそのクローン内で行ってください。
/flash/
├── main.py ランチャーメニュー(UIFlow のブートフローを置き換え)
├── buddy_*.py 共有ライブラリ(BLE、UI、状態管理、プロトコル、文字セット)
├── burst_frames.py スプライトフレーム
└── apps/
├── claude_buddy.py BLE クライアント → Claude Desktop の Hardware Buddy
├── hello_cardputer.py
└── snake.py
main.py は起動時に /flash/apps/ をスキャンし、すべての .py ファイルをメニュー項目として一覧表示します。
buddy/device/apps/ にファイルを追加してプッシュすれば、次回起動時にメニューへ反映されます。
buddy/device/apps/hello_cardputer.py を参考にしてください。
これはキーボードポーリング・フォント・終了規約の最小構成サンプルです。
再フラッシュ不要で、以下のコマンドでプッシュできます:
python3 onboard/scripts/install_apps.py --port <PORT> --src buddy
<PORT> は直前の detect.py 実行で報告されたポート名です
(例:/dev/cu.usbmodem1101、/dev/ttyACM0、COM3)。
buddy/scripts/)# USB シリアル経由で一部のファイルをプッシュ
python3 buddy/scripts/push.py --port <PORT> --files apps/snake.py
# デバイスログを監視
python3 buddy/scripts/tail_serial.py --port <PORT>
# REPL への単発コマンド実行
python3 buddy/scripts/repl_run.py --port <PORT> --script "import os; print(os.listdir('/flash'))"
The buddy/ directory in the local build-with-claude clone is the MicroPython payload that m5-onboard installs onto /flash/. Work inside that clone.
/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.
Crib from buddy/device/apps/hello_cardputer.py — smallest example of keyboard polling, font, and exit conventions. Then push without re-flashing:
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/scripts/)# Push a subset of files over USB-serial
python3 buddy/scripts/push.py --port <PORT> --files apps/snake.py
# Watch device logs
python3 buddy/scripts/tail_serial.py --port <PORT>
# One-shot REPL exec
python3 buddy/scripts/repl_run.py --port <PORT> --script "import os; print(os.listdir('/flash'))"
原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。