gimbal_motion_detect
Skill37 starsChanged 33 days agoMITView on GitHub
Use this skill when the user wants esp-claw to show the camera preview on the LCD and draw a bounding box around moving regions. The script opens the board camera, converts frames to RGB565, displays the same centered preview style used by gimbal_color_detect, and runs the standalone motion_detect Lua module. Preview display crops a centered 240x240 square from the board-default camera stream and draws it centered on the 284x240 LCD without additional flipping. Start motion tracking: Stop motion tracking: Stop…
In this repository24 other files it gives its agents.
- air_mouseSkill
- bilibili_up_fansSkill
- china_a_share_quoteSkill
- cloudmusicSkill
- current_ip_infoSkill
- current_weatherSkill
- dfrobot_matrix_lidar_8x8_i2cSkill
- dfrobot_stcc4_i2cSkill
- example_skillSkill
- flashbackSkill
- gimbal_color_detectSkill
- github_repo_starSkill
- movement_detectionSkill
- network_radioSkill
- servo_dogSkill
- stock_quotes_displaySkill
- token_usageSkill
- unihiker_buttonSkill
- unihiker_expansion_batterySkill
- unihiker_expansion_irSkill
- unihiker_expansion_motor_controlSkill
- unihiker_expansion_servo_controlSkill
- unihiker_expansion_WS2812Skill
- weather_clockSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 20
Use this skill when the user wants esp-claw to show the camera preview on the LCD and draw a bounding box around moving regions.
- Distinctive: line 34
If camera discovery or opening fails, report the actual error.
- Distinctive: line 137
Stop requests are handled by the Lua job executor.
- Very specific: line 144
Run {CUR_SKILL_DIR}/scripts/start_gimbal_motion_detect.lua with lua_run_script_async.
- Very specific: line 145
Use timeout_ms: 0, name: "gimbal_motion_detect", exclusive: "gimbal_motion_detect", and replace: true.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Gimbal Motion Detect
Use this skill when the user wants esp-claw to show the camera preview on the
LCD and draw a bounding box around moving regions. The script opens the board
camera, converts frames to RGB565, displays the same centered preview style used
by gimbal_color_detect, and runs the standalone motion_detect Lua module.
Preview display crops a centered 240x240 square from the board-default camera
stream and draws it centered on the 284x240 LCD without additional flipping.
Default Hardware
- Discover the camera with
camera.list_devices()and open its first device. - Open the built-in display with
display.open(). - A single async Lua job owns camera, preview, and motion detection.
- Each preview uses
screen:begin(),screen:image(), andscreen:present({ full = true }). - If camera discovery or opening fails, report the actual error.
Start Script Args Schema
{
"type": "object",
"properties": {
"run_seconds": {
"type": "integer",
"default": 0,
"description": "0 means run until the async Lua job receives a cooperative stop request."
},
"capture_timeout_ms": {
"type": "integer",
"default": 500,
"description": "Camera frame wait timeout. Keep this short enough that stop requests can reach cleanup quickly."
},
"frame_interval_ms": {
"type": "integer",
"default": 0,
"description": "Extra delay after each frame. Keep 0 for maximum camera/display throughput."
},
"display_every_n": {
"type": "integer",
"default": 1
},
"perf_log_every_n": {
"type": "integer",
"default": 30,
"description": "Print average get/convert/detect/display/loop timing every N frames. Set 0 to disable."
},
"display_crop_size": {
"type": "integer",
"default": 240,
"description": "Centered square crop size before drawing to the LCD."
},
"pixel_diff_threshold": {
"type": "integer",
"default": 24,
"description": "Per-pixel luma difference threshold."
},
"active_pixel_percent": {
"type": "integer",
"default": 5,
"description": "Minimum active-pixel percentage inside the ROI required for raw motion."
},
"confirm_frames": {
"type": "integer",
"default": 2
},
"hold_frames": {
"type": "integer",
"default": 3
},
"block_size": {
"type": "integer",
"default": 4
},
"block_hit_pixels": {
"type": "integer",
"default": 15
},
"box_padding": {
"type": "integer",
"default": 2
},
"box_deadband": {
"type": "integer",
"default": 2
},
"box_snap_threshold": {
"type": "integer",
"default": 24
}
}
}Tool Call Inputs
Start motion tracking:
{
"path": "{CUR_SKILL_DIR}/scripts/start_gimbal_motion_detect.lua",
"args": {},
"timeout_ms": 0,
"name": "gimbal_motion_detect",
"exclusive": "gimbal_motion_detect",
"replace": false
}Stop motion tracking:
{
"name": "gimbal_motion_detect",
"wait_ms": 2000
}Stop requests are handled by the Lua job executor. The script keeps the camera capture timeout short so stop can interrupt promptly, then runs camera, display, and detector cleanup from the script exit path.
Recommended Flow
- Activate
gimbal_motion_detect. - Run
{CUR_SKILL_DIR}/scripts/start_gimbal_motion_detect.luawithlua_run_script_async. - Use
timeout_ms: 0,name: "gimbal_motion_detect",exclusive: "gimbal_motion_detect", andreplace: true. - Tune
pixel_diff_threshold,active_pixel_percent, andblock_hit_pixelsfor sensitivity.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

