OpenClaw + UNIHIKER K10: Enabling AI Hardware Programming with Natural Language
1. Introduction
Recently, the open-source AI agent framework OpenClaw has gained widespread attention in the developer community. It can directly operate a computer system through natural language instructions, automatically completing tasks such as file organization and email managementātransforming AI from a simple conversational tool into an intelligent assistant capable of executing real tasks. Given that OpenClaw can control computer systems, a natural question arises: can it also extend to controlling hardware devices and enable natural languageādriven hardware programming?
In this project, I will demonstrate how to deploy OpenClaw on LattePanda and integrate it with UNIHIKER K10. Users only need to describe the desired functionality in natural language, and OpenClaw will invoke a large language model (LLM) to automatically generate, debug, and upload the code. The program is then executed directly on the UNIHIKER K10. The entire process takes only 1ā3 minutes and requires no manual coding, turning hardware programming into a truly natural language interaction experience.

Ā 2. Demo video
Ā
The following is the demonstration video.
Ā
Ā
4.OpenClaw Environment Setup
OpenClaw provides powerful system-level control capabilities. It can directly manage files, install software, and even modify system configurations. However, installing it directly on a personal computer may introduce risks such as unintended operations or potential impacts on system files.
To ensure safety, this project runs OpenClaw on LattePanda IOTA x86 Single Board Computer. As a standalone device, LattePanda can independently execute OpenClaw, offering a good balance between security and computing performance.
OpenClaw supports operating systems such as Windows, macOS, and Linux. You can also deploy it on any device that supports OpenClaw. For detailed installation instructions, please refer to the official documentation: https://docs.openclaw.ai
Tip: It is recommended to use a Coding-enabled API for better performance.
After installation, you can interact with your ālobsterā through the official Web UI, or integrate it into chat platforms such as Feishu for a more conversational experience.
5.AI Hardware Programming Workflow
The following illustrates the workflow for implementing AI hardware programming with LattePanda , OpenClaw, and UNIHIKER K10.

Users provide their requirements in natural language, for example: āI want the K10 to turn on a red light when a face is detected.ā OpenClawās AI Agent first interprets the instruction and invokes a large language model (LLM) to generate the corresponding program code. The LLM references the UNIHIKER K10 programming documentation to automatically write and debug the code, then uploads the program to the K10. Finally, the device executes the functionality according to the userās description.
This process creates a closed loop: āUser Natural Language ā AI Automatic Programming ā Hardware Responseā, simplifying the hardware programming workflow while allowing users to see their instructions come to life. Without writing any code manually, users can easily experience AI-driven natural language control of hardware.
6. UNIHIKER K10 AI Hardware Programming Tutorial
The UNIHIKER K10 is equipped with the ESP32-S3, allowing hardware programming using either Arduino C or rapid hardware control via MicroPython. In the following sections, I will introduce two distinct AI hardware programming tutorialsāArduino and MicroPythonāso you can choose the version that best fits your programming habits and project requirements.
6.1 Arduino Version Tutorial
Ā
6.1.1 Deploying the Arduino Programming Environment
To enable the AI Agent to autonomously program the UNIHIKER K10 using Arduino C, it is first necessary to deploy the Arduino programming environment. Arduino CLI is the official command-line tool provided by Arduino. By installing Arduino CLI and configuring the Board Support Package (BSP) for the UNIHIKER K10, OpenClaw can automatically compile and upload generated code without manual intervention, achieving a fully automated hardware programming workflow.
An official installation guide for Arduino CLI can be provided, allowing OpenClaw to perform the installation automatically.
In the chat, enter the following command: Ā Please help me install Arduino CLI using the provided link: https://docs.arduino.cc/arduino-cli/installation/Ā
Ā

Ā In the chat, enter the following command to check whether OpenClaw has successfully completed the installation: Has Arduino CLI been installed successfully?
Ā

After completing the Arduino CLI installation, the next step is to have OpenClaw install the UNIHIKER K10 Board Support Package (BSP). Here, the BSP version for the UNIHIKER K10 is specifically set to 0.0.1.
In the chat, enter the following command: Please help me install the UNIHIKER K10 Arduino CLI BSP using the provided link. The installed version must be 0.0.1 and no other version. Link: https://www.unihiker.com.cn/wiki/k10/ArduinoIDE_prepare\
Ā

Ā Similarly, you can verify whether the UNIHIKER K10 BSP has been installed successfully.
Ā

6.2 Ā AI Agent Guided Arduino Programming
After completing the Arduino programming environment setup and installing the K10 BSP, you can guide the AI Agent to automatically generate programs for the UNIHIKER K10 using Arduino.
To ensure the AI Agent correctly understands how to use Arduino programs to control K10 hardware, two reference documents have been prepared:examples_arduinoide.md(an Arduino example program Markdown document from the official UNIHIKER K10 Wikiļ¼ and CodeReference_arduinoide.mdļ¼the Arduino IDE library reference documentļ¼.
Ā

With these two documents, the AI Agent can automatically generate Arduino programs that comply with the K10 hardware specifications based on usersā natural language instructions.
OpenClaw maintains a workspace that stores all its working information and files. You can manually add the above two documents to this workspace to ensure that OpenClaw can reliably access them every time.
You can also enter a command to check the exact path of the OpenClaw workspace on your computer: Ā Tell me the path of the OpenClaw workspace on this computer.
Ā

Manually copy and add these two documents to the OpenClaw workspace (the documents are attached at the end).
Ā

Ā
Connect the UNIHIKER K10 to your computer using a USB data cable, and open the Device Manager to identify the corresponding COM port for the K10.
Ā

Ā
Ā
Next, you can guide the AI Agent to autonomously program and control the UNIHIKER K10. In the instructions, three key pieces of information need to be provided: the boardās COM port, the programming language, and the program functionality. The AI Agent will use this information, along with the official reference documents (examples_arduinoide.md and CodeReference_arduinoide.md), to generate a complete Arduino program and upload it to the K10.
For example:Referencing examples_arduinoide.md and CodeReference_arduinoide.md in the workspace, write an Arduino program that displays ambient light values, updates temperature and humidity every second, and runs on the UNIHIKER K10 connected to COM15
Ā

Ā
Wait 3ā4 minutes and observe the program execution results returned by OpenClaw, as well as the response from the UNIHIKER K10. Below are my results.
Ā


6.2.1 Adding an Arduino Programming Skill
We can turn the process of writing, compiling, and uploading programs using Arduino CLI into a skill and install it in OpenClaw on your computer. This way, when controlling the UNIHIKER K10 via natural language, you no longer need to specify the locations of the reference documents each time.
Enter the following command: Organize the above workflow of programming and uploading to the UNIHIKER K10 using Arduino CLI, referencing examples_arduinoide.md and CodeReference_arduinoide.md, into a K10-Arduino-Skill. With this skill installed, when the user provides the programming language, program functionality, and the K10 COM port, you should autonomously complete the program writing, debugging, and uploading process. Install this skill.
Ā
Ā

Ā
This way, the next time you use it, you can simply enter the command:Write a program in Arduino to ⦠and upload it to the UNIHIKER K10 on COM port.
Ā
Ā
6.3 MicroPython Version Tutorial
6.3.1 Deploying the MicroPython Programming Environment
Ā
The UNIHIKER K10 supports MicroPython programming. Compared with Arduino, MicroPython reduces the compilation steps, thereby shortening development time.
First, you need to flash the specified MicroPython firmware to the UNIHIKER K10 according to the official tutorial:
UNIHIKER K10 MicroPython Firmware Flashing Tutorial.
Ā
After completing the firmware flashing, you need to install Python on your computer and set it as a global environment variable so that you can interact with the K10 and upload programs locally via the command line or an IDE (such as Thonny or uPyCraft). You can refer to the official Python installation guide: https://www.python.org/.
To verify that Python has been successfully set as a global environment variable, open PowerShell and enter: Ā python --version
If it outputs the Python version number, the global environment variable has been successfully set. This allows the AI Agent to directly use Python from the command line for programming and uploading programs.
Ā

Ā
You also need to install the mpremote tool, which is used to communicate with MicroPython devices.
In OpenClaw, enter the following command: Please install the mpremote tool for communicating with MicroPython devices.
Ā

Ā
6.3.2 AI Agent Guided MicroPython Programming
After setting up the MicroPython programming environment, you can guide the AI Agent to automatically generate programs for the UNIHIKER K10 using MicroPython.
To ensure the generated programs run correctly, provide the AI Agent with the reference document micropython-example.md (see the appendix), which contains basic K10 examples and commonly used function calls.
In practice, you only need to give the AI Agent a clear task description, such as functional requirements and device port information, and specify that it should reference this document when programming. The AI Agent will use the example code in micropython-example.md to automatically generate MicroPython programs that comply with K10 specifications, and upload them to the device for execution via command-line tools.
Manually copy the micropython-example.md document into the OpenClaw workspace.
Ā


Connect the MicroPython version of the UNIHIKER K10 to your computer using a USB data cable, and open the Device Manager to identify the corresponding COM port for the K10āfor example, as shown below, the port is COM14.
Ā

Ā
For example:
Referencing the micropython-example.md document in the workspace, write a MicroPython program that turns the K10ās onboard RGB light red when a face is detected, and upload and run it on the UNIHIKER K10 connected to COM14 using mpremote.
Ā


6.4 Appendix: File Descriptions
The appendix files for this project provide Arduino and MicroPython programming reference materials for the UNIHIKER K10, as well as the corresponding OpenClaw Skill files, as shown below.

The Arduino section includes the programming reference document examples_arduinoide.md and the library function reference document CodeReference_arduinoide.md. Based on these two documents, we have prepared the unihiker-k10-arduino OpenClaw Skill file, which enables the AI Agent to perform Arduino programming and control the UNIHIKER K10.
You can download this Skill file to a device with OpenClaw installed, and install it using the following command: Ā Install the unihiker-k10-arduino Skill in the specified folder on my computer" (you will need to provide OpenClaw with the exact path to the folder).
Once installed, the AI Agent will be able to automatically generate Arduino programs that comply with K10 specifications and complete both compilation and uploading.
Ā

The MicroPython section provides the micropython-example.md reference document, which contains MicroPython example code for the UNIHIKER K10. The AI Agent can reference this when generating programs.
Additionally, the unihiker-k10-micropython folder contains the corresponding MicroPython Skill file. You can download this folder to a device with OpenClaw installed and install it using the following command: Install the unihiker-k10-micropython Skill in the specified folder on my computer" (you need to provide OpenClaw with the exact path to the folder).
Once installed, the AI Agent will be able to automatically flash the UNIHIKER K10 MicroPython firmware and generate MicroPython programs that comply with K10 specifications, achieving a fully automated hardware programming workflow.
Ā
Ā
Hello,
The Unihiker K10 Agent Skills I developed have been released on ClawHub and GitHub:
š¦ ClawHub (Direct Installation Available):
Unihiker K10 Arduino: https://clawhub.com/skills/unihiker-k10-arduino
Unihiker K10 MicroPython: https://clawhub.com/skills/unihiker-k10-micropython
š GitHub Repository: https://github.com/rockets-cn/unihiker-k10-skills
These skills provide a complete development toolchain:
Arduino CLI toolchain (including pre-compiled Windows version)
Multiple upload scripts (PowerShell/Python/Batch/Bash)
Complete API documentation and sample code
MicroPython firmware support
Installation Commands:
clawhub install unihiker-k10-arduino
clawhub install unihiker-k10-micropython
Feel free to try them out and share your feedback!
Ā









