ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

micropython-skills

Program and interact with embedded development boards (ESP32, ESP32-S3, ESP32-C3, ESP8266, NodeMCU, Raspberry Pi Pico, RP2040, STM32) through real-time REPL. This skill turns microcontroller hardware into an AI-programmable co-processor — read sensors, control actuators, flash firmware, diagnose devices, and deploy algorithms. Trigger when the user mentions any dev board or hardware interaction: ESP32, ESP8266, NodeMCU, Pico, 开发板, 板子, 单片机, 嵌入式, microcontroller, development board, sensor reading, GPIO, LED, motor, relay, I2C, SPI, UART, ADC, PWM, servo, DHT, BME280, temperature sensor, 传感器, 读传感器, 控制电机, 继电器, flash firmware, 烧录, 刷固件, 刷机, mpremote, MicroPython, IoT, MQTT, WiFi on board, 设备没反应, device not responding, or any task involving programming or controlling a physical microcontroller board.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/0x1abin/micropython-skills
Or

micropython-skills

AI Agent programmable co-processor skill collection. You (the Agent) generate MicroPython code, push it to devices via REPL, parse structured output, and iterate — turning hardware into your extended capability.

Quick Start

Python command: Use python3 on macOS/Linux, python on Windows. On Windows, python3 is often a Microsoft Store stub that silently fails (exit code 49). On macOS/Linux, python may not exist or may point to Python 2.

Every interaction follows this flow:

  1. Probe — Run python3 {SKILL_DIR}/scripts/device_probe.py to discover connected devices
    • status: "ok" → Device has MicroPython, proceed to step 2
    • status: "no_firmware" → ESP chip detected but no MicroPython. Ask user to confirm, then flash: python3 {SKILL_DIR}/scripts/firmware_flash.py --port PORT --yes
    • status: "no_device" → No device connected. Guide user to connect hardware.
    • status: "permission_denied" → Serial port not accessible. On Linux: sudo chmod 666 /dev/ttyACM0. On Windows: check Device Manager for driver issues.
  2. Connect — Default: USB via mpremote. Optional: WiFi via WebREPL (user must request)
  3. Execute — Generate MicroPython code and push to device
  4. Parse — Scan stdout for tagged lines (RESULT:/ERROR:/STATUS:/LOG:)
  5. Iterate — Adjust code based on results, repeat steps 3-5

Where {SKILL_DIR} is the directory containing this SKILL.md file.

Connection Management

Default: USB (mpremote)

Always start by probing for devices:

python3 {SKILL_DIR}/scripts/device_probe.py

Execute code on device:

mpremote exec "import machine; print('RESULT:' + str(machine.freq()))"

Run a script file:

mpremote run script.py

For multi-line code, write a temporary .py file locally, then mpremote run /path/to/task.py.

Serial port names vary by platform:

PlatformPort FormatExample
Linux/dev/ttyUSB0, /dev/ttyACM0mpremote connect /dev/ttyACM0
macOS/dev/cu.usbserial-, /dev/cu.usbmodemmpremote connect /dev/cu.usbmodem14101
WindowsCOM3, COM4, ...mpremote connect COM3

The scripts auto-detect the port — you rarely need to specify it manually.

Optional: WiFi (WebREPL)

Only switch to WiFi when the user explicitly requests it. The switch flow:

  1. Ask user for WiFi SSID and password
  2. Push WiFi + WebREPL config to device via USB:
    python3 {SKILL_DIR}/scripts/wifi_setup.py --ssid "SSID" --password "PASS" --webrepl-password "repl123"
    
  3. Note the IP address from the output
  4. From now on, execute code over WiFi:
    python3 {SKILL_DIR}/scripts/webrepl_exec.py --host 192.168.1.100 --password repl123 --code "print('hello')"
    
  5. USB cable can be disconnected

For detailed command reference, read ./references/connections.md.

Sub-skill Router

Metadata

Author@0x1abin
Stars4473
Views0
Updated2026-05-01
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-0x1abin-micropython-skills": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.