Install
openclaw skills install @nick-ccq/unihiker-m10-pythonDevelop, run, and troubleshoot Python programs for the UNIHIKER M10 from Windows or macOS with the unihiker and PinPong APIs. Use when a user wants to control the display, buttons, onboard sensors, buzzer, GPIO, PWM/ADC, or audio, needs help connecting and deploying over SSH with pyenv, uv, or system Python, or needs missing Python dependencies installed when the M10 has no Internet access.
openclaw skills install @nick-ccq/unihiker-m10-pythonBuild and deploy Python projects for the UNIHIKER M10 from plain-language requirements.
.ps1 scripts with Windows PowerShell..sh scripts with bash. Do not require PowerShell on macOS.10.1.2.3 is reachable.dfrobot value is only the factory default.Ask whether the M10 is connected:
10.1.2.3.Run the matching check from the skill root:
Windows:
powershell -ExecutionPolicy Bypass -File scripts/check_connection.ps1
powershell -ExecutionPolicy Bypass -File scripts/check_connection.ps1 -M10Host 192.168.x.x
macOS:
bash scripts/check_connection.sh
bash scripts/check_connection.sh --host 192.168.x.x
0: continue to environment detection.1: report the failure, summarize the connection guide, and stop.You may skip the initial question only when the same user message states that the board is connected, identifies USB or a usable IP, and includes a concrete programming request. Still run the connection check.
Run:
Windows:
powershell -ExecutionPolicy Bypass -File scripts/detect_python_env.ps1
powershell -ExecutionPolicy Bypass -File scripts/detect_python_env.ps1 -M10Host 192.168.x.x
macOS:
bash scripts/detect_python_env.sh
bash scripts/detect_python_env.sh --host 192.168.x.x --save-env-file .m10-env.json
Offer only detected environments, plus system Python as a fallback:
pyenv 3.12.7 when detected; recommend it because current images normally install unihiker and pinpong there.uv when detected.python3 as the fallback.Write the choice to .m10-env.json in the current project or skill root. Follow the schema in m10-env.example.json and the rules in m10-python-env.md.
Choose the API layer:
unihiker for the display, touch UI, button callbacks, audio, and brightness.pinpong.extension.unihiker for onboard sensors, the buzzer, GPIO, PWM, and ADC.Start hardware programs with the required initialization:
from pinpong.board import Board
from pinpong.extension.unihiker import *
from unihiker import GUI
import time
Board("UNIHIKER").begin()
gui = GUI()
Use code-templates.md for common structures and unihiker-pinpong-api.md for API details.
Any program that draws to the display must remain alive long enough for the user to see it. Choose one pattern:
while True: time.sleep(0.05).Deploy long-running display programs with -Background on Windows or --background on macOS.
Board("UNIHIKER"), never Board("M10").Windows:
powershell -ExecutionPolicy Bypass -File scripts/run_on_m10.ps1 path/to/program.py -EnvFile .m10-env.json
powershell -ExecutionPolicy Bypass -File scripts/run_on_m10.ps1 path/to/program.py -EnvFile .m10-env.json -Background
powershell -ExecutionPolicy Bypass -File scripts/run_on_m10.ps1 path/to/program.py -EnvFile .m10-env.json -PipInstall requests
powershell -ExecutionPolicy Bypass -File scripts/run_on_m10.ps1 path/to/program.py -EnvFile .m10-env.json -PipInstall requests -OfflinePipInstall
macOS:
bash scripts/run_on_m10.sh path/to/program.py --env-file .m10-env.json
bash scripts/run_on_m10.sh path/to/program.py --env-file .m10-env.json --background
bash scripts/run_on_m10.sh path/to/program.py --env-file .m10-env.json --pip-install requests
bash scripts/run_on_m10.sh path/to/program.py --env-file .m10-env.json --pip-install requests --offline-pip-install
Environment rules:
mode=pyenv: run with python_bin; install with {python_bin} -m pip install.mode=uv: run with uv run python; install with uv pip install.mode=system: run with python3; install with python3 -m pip install.Review stdout and stderr, make the smallest necessary correction, and rerun. Report whether the program is running in the foreground or background and how to stop it.
If execution reports ModuleNotFoundError, first decide whether the missing name is a project-local module or a third-party distribution. Upload omitted project files; do not install a similarly named PyPI package.
When a third-party distribution is missing and the M10 cannot access the Internet, run:
Windows:
powershell -ExecutionPolicy Bypass -File scripts/install_m10_package_offline.ps1 <distribution> -EnvFile .m10-env.json
macOS:
bash scripts/install_m10_package_offline.sh <distribution> --env-file .m10-env.json
Then rerun the original program in the same selected environment. Do this without asking again when the import-to-distribution mapping is unambiguous and the user already authorized running the program. Ask before choosing between plausible distributions.
The offline installer must:
py3-none-any wheels; never upload Windows wheels.--no-index so the M10 does not contact PyPI.Read offline-dependencies.md for package-name mapping and failure handling.
| Need | API |
|---|---|
| Text | gui.draw_text(...) |
| Clear display | gui.clear() |
| A/B buttons | gui.on_a_click(fn), gui.on_b_click(fn) |
| Light | light.read() |
| Accelerometer | accelerometer.get_x(), get_y(), get_z() |
| Gyroscope | gyroscope.get_x(), get_y(), get_z() |
| Buzzer | buzzer.pitch(freq, beat) |
| Digital GPIO | Pin(Pin.P0, Pin.OUT).write_digital(1) |
| Analog input | Pin(Pin.P0, Pin.IN).read_analog() |
| Audio | Audio().record("a.wav", 3), Audio().play("a.wav") |
| Brightness | UNIConfig().set_brightness(80) |
10.1.2.3 for USB.gui.clear() erased the content and keep the process alive.unihiker and pinpong are installed in the selected interpreter.ModuleNotFoundError: distinguish a missing project file from a third-party distribution, install it with the offline workflow, and rerun.