unihiker_expansion_motor_control
Skill37 starsChanged 33 days agoMITView on GitHub
Use this skill to control motors on a DFRobot UNIHIKER Expansion board (SKU: DFR1216). Chinese name is 行空板扩展板. Run exactly one script with lua_run_script. If lua_run_script returns an error, report that error directly to the user. Do not retry with changed arguments in the same turn unless the user explicitly asks. Stop all motors: Drive motor1 forward: Drive motor1 reverse: Drive four motors with mixed duty values: Drive motor1 forward for 2 seconds, then auto stop: Notes: - auto_stop_ms is…
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
- gimbal_motion_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_servo_controlSkill
- unihiker_expansion_WS2812Skill
- weather_clockSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 3 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Use this skill to control motors on a DFRobot UNIHIKER Expansion board (SKU: DFR1216).
- Very specific: line 20
Run exactly one script with lua_run_script.
- Very specific: line 22
If lua_run_script returns an error, report that error directly to the user.
- Distinctive: line 23
Do not retry with changed arguments in the same turn unless the user explicitly asks.
- Very specific: line 59
When auto_stop_ms > 0, the script waits that many milliseconds and then writes all motor duty channels to 0.
- Distinctive: line 64
Use the script defaults unless the user explicitly provides custom I2C settings.
- Very specific: line 65
Run {CUR_SKILL_DIR}/scripts/set_motor.lua with desired period_12, period_34, and duty.
- Very specific: line 66
If immediate emergency stop is needed, run the script with stop_all: 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
UNIHIKER Expansion Motor Control
Use this skill to control motors on a DFRobot UNIHIKER Expansion board (SKU: DFR1216). Chinese name is 行空板扩展板.
Run exactly one script with lua_run_script.
If lua_run_script returns an error, report that error directly to the user.
Do not retry with changed arguments in the same turn unless the user explicitly asks.
Tool Call Inputs
Stop all motors:
{"path":"{CUR_SKILL_DIR}/scripts/set_motor.lua","args":{"stop_all":true}}Drive motor1 forward:
{"path":"{CUR_SKILL_DIR}/scripts/set_motor.lua","args":{"period_12":255,"duty":{"m1_a":255,"m1_b":0}}}Drive motor1 reverse:
{"path":"{CUR_SKILL_DIR}/scripts/set_motor.lua","args":{"period_12":255,"duty":{"m1_a":0,"m1_b":255}}}Drive four motors with mixed duty values:
{"path":"{CUR_SKILL_DIR}/scripts/set_motor.lua","args":{"period_12":255,"period_34":255,"duty":{"m1_a":255,"m1_b":0,"m2_a":0,"m2_b":255,"m3_a":50,"m3_b":0,"m4_a":0,"m4_b":50}}}Drive motor1 forward for 2 seconds, then auto stop:
{"path":"{CUR_SKILL_DIR}/scripts/set_motor.lua","args":{"period_12":255,"auto_stop_ms":2000,"duty":{"m1_a":255,"m1_b":0}}}Notes:
auto_stop_msis optional. Default is0(no timer stop).- When
auto_stop_ms > 0, the script waits that many milliseconds and then writes all motor duty channels to0.
Recommended Flow
- Confirm the expansion board is connected to an available I2C bus.
- Use the script defaults unless the user explicitly provides custom I2C settings.
- Run
{CUR_SKILL_DIR}/scripts/set_motor.luawith desiredperiod_12,period_34, andduty. - If immediate emergency stop is needed, run the script with
stop_all: true. - Report script output directly to the user, including any error.
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.

