k230-photo-timing

Diagnose K230 camera snapshot timing, throttling, and serial recovery issues.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? K230 embedded camera projects hit opaque failures: snapshot+save pipelines capped at 20 FPS, YUV420SP frames that refuse to save, devices that hang when multi-channel sensors are configured, and serial ports that go completely dead mid-session. This Skill captures measured timing data and verified workarounds so these pitfalls are diagnosed instead of rediscovered. ## Core Features & Use Cases - Timing Verification: Validates throttle gating behavior with measured data (photo_interval_ms=10/100, ~209k loop iterations, effective FPS of 20.1 and 10.0) and the Display-binding path that reaches 25-28 FPS. - Format & Channel Rules: Enforces the YUV420SP constraint (only format supported by Display.bind_layer, unsavable via img.save()) and routes snapshot+save through chn1/chn2 RGB channels. - Failure Recovery: Documents the Sensor(id=N) multi-channel hang, empty photo directory diagnosis from serial flooding, and the rmmod/modprobe ftdi_sio driver reload protocol with REPL re-entry steps. - Use Case: When a K230 photo session produces empty directories or the serial port stops responding, follow the diagnosis patterns to identify silent init failures and recover the device without a power cycle. ## Quick Start Ask the assistant to diagnose why your K230 photo capture only achieves 20 FPS and which sensor channel configuration reaches 25-28 FPS.

Frequently Asked Questions about k230-photo-timing

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

FAQPage Schema
How do I increase K230 camera snapshot FPS beyond 20?

Bind chn0 to the display layer using YUV420SP and route snapshot+save through chn2 in RGB565. This hardware pipeline (GDMA/DSP) cuts snapshot time to about 21ms, giving total snapshot+save of 35-40ms for 25-28 FPS.

Why does img.save() fail with 'current format not support save function' on K230?

YUV420SP frames cannot be saved via img.save(); that format is only supported by Display.bind_layer. Capture the frame for saving from chn1 (RGB888) or chn2 (RGB565/RGBP888) instead of chn0.

Why does the K230 hang when configuring multiple sensor channels?

Using the Sensor(id=N, width, height, fps) constructor and then setting chn2 via set_framesize causes an immediate, unrecoverable device hang. Only initialize chn0 with that constructor; recovery requires reloading the ftdi_sio kernel driver.

How do I recover a K230 serial port that stopped responding?

Reload the kernel driver with 'sudo rmmod ftdi_sio; sleep 1; sudo modprobe ftdi_sio'. Then send Ctrl+C several times, Ctrl+D, and wait 0.5s before the first command, since main.py keeps flooding the UART after the reload.

Why are K230 photo session directories empty on the SD card?

Serial flooding can let ensure_dir() create the session directory while the subsequent sensor init silently fails, leaving empty stubs. Check photo_sequence.txt against directories containing files, and clean up empty session directories on startup.

How does photo_interval_ms throttling behave on the K230 main loop?

The throttle gate limits snapshot calls to 1000/interval regardless of loop speed. Measured with ~209,595 iterations: interval=10 yields 21 snapshots at 20.1 effective FPS (limited by save time), interval=100 yields 20 snapshots at exactly 10.0 FPS.