k230-development-lessons

Automate K230 board management via direct Pyboard serial calls instead of ampy run.

6|1|Updated May 11, 2026
One-click install
npx skills add https://github.com/yakeworld/Synthos --skill k230-development-lessons-yakeworld
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: k230-development-lessons
Source: https://github.com/yakeworld/Synthos/tree/main/skills/private/k230-development-lessons
Command: npx skills add https://github.com/yakeworld/Synthos --skill k230-development-lessons-yakeworld

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pyserial, adafruit-ampy, and includes scripts (resource) and references (resource) components.

What problem does it solve? K230 development boards fail with the standard ampy run (raw REPL) workflow, and developers hit recurring pitfalls like GPIO/FPIOA misconfiguration across firmware variants, deadlocked serial ports, and broken main-loop structures. This Skill captures verified workarounds and automation patterns so these failures are diagnosed and resolved without rediscovery. ## Core Features & Use Cases - Direct Pyboard Automation: Bypass the broken ampy run path by calling ampy.pyboard.Pyboard directly for code execution, file upload/download, directory listing, and soft reboot via machine.reset(). - Firmware and Board Detection: Branch GPIO/FPIOA configuration based on /revision.txt (RT-Smart vs CanMV) and os.uname()[-1] board type (01studio GPIO21 vs lckfb GPIO53). - Failure Diagnosis Playbooks: Handle serial deadlocks (physical USB replug), lsusb false positives, MicroPython limitations, and main-loop structural bugs like duplicate main() calls and idle sleeps that kill button polling. - Use Case: When deploying a camera application to a K230 CanMV board, use this Skill to upload scripts, verify video recording pipelines (H264 + MP4 muxer), configure the button GPIO correctly for the detected board, and soft-reboot the device without touching the hardware. ## Quick Start Ask the assistant to connect to the K230 board on /dev/openmvcam and run a directory listing plus a soft reboot using the direct Pyboard approach.

Frequently Asked Questions about k230-development-lessons

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run code on a K230 board when ampy run fails?

Call ampy.pyboard.Pyboard directly from Python instead of the ampy CLI. Open Pyboard('/dev/openmvcam', baudrate=115200), call enter_raw_repl(), then exec_(code) to run code and get output, and exit_raw_repl() when done.

How do I reboot a K230 board programmatically without unplugging USB?

Send 'import machine; machine.reset()' through the serial connection using Pyboard.exec_(). This performs a full soft reboot over the wire, so the entire automation pipeline needs no physical interaction with the device.

Does K230 GPIO configuration require FPIOA setup?

It depends on the firmware. RT-Smart firmware (check /revision.txt for 'rtsmart') requires an explicit fpioa.set_function(pin, FPIOA.GPIO0 + pin) call before machine.Pin(). Standard CanMV firmware handles FPIOA internally, and extra FPIOA calls break the mapping.

Why is my K230 button press not being detected?

Two common causes: the wrong GPIO for your board (01studio uses GPIO21 active-low, lckfb uses GPIO53 active-high, detect via os.uname()[-1]), or an idle time.sleep() over 1ms in the main loop that misses short button presses during polling.

What should I do when the K230 serial port stops responding completely?

If sendBreak, Ctrl+C, and Ctrl+D all produce no output, the device is deadlocked and only physical USB re-plugging recovers it. Note that lsusb succeeding does not mean the serial port is usable; the device can be in a dumb state.