Project 38 ESP-Claw Chat CodingK10 AI-Interactive Robot Control

0 29 Medium

In the previous lesson, dialogue made the K10 desktop assistant perform tasks. Now we will teach it to use an expansion board and control a motor: press Button A to start and Button B to stop.

How does an Agent learn a new capability? First install an existing button Skill. Then use a computer-side coding Agent to create a DFR0548 Expansion Board Motor-Control Skill and combine both capabilities. Complete the two tasks before trying the camera color-recognition extension.

Project Objectives

Knowledge Objectives

1. Understand what a Skill is and the roles of its instruction file and executable program.

2. Learn how to find, download, install, and invoke an existing Skill.

3. Provide a coding Agent with hardware information and clear requirements, then create and verify a new Skill.

NOTE: See the Knowledge Base for an introduction to Skills.

Practical Objective

Install unihiker_button and create a DFR0548 Expansion Board Motor-Control Skill to make Button A start the motor and Button B stop it.

Materials List

image1.png

UNIHIKER K10 ×1

image2.png

TT Motor ×1

image3.png

Expansion Board ×1

image4.png

USB Data Cable ×1

image5.png

Board Power Cable ×1

image6.png

Power Bank ×1

HARDWARE LIST
UNIHIKER K10
TT Motor
Expansion Board
USB Data Cable
Board Power Cable
Power Bank

Preparations

Hardware Setup

(1)Cut off the TT motor connector and strip the insulation to expose the copper wires. Connect the wires to motor port M1 on the expansion board, observing the correct polarity.

   

(2) Insert the UNIHIKER K10 edge connector vertically into the expansion board's Micro:bit socket.

(3) Connect the K10 to the computer by USB for program upload, and power the expansion board from the computer with its power cable. Then switch the expansion board to ON.

NOTE: The K10 operates at 3.3 V, while the motor requires 3-7.5 V (rated at 6 V). Because the K10 cannot reliably power the motor, use an external supply for the expansion board, such as a computer or portable power bank.

Software Preparation

Use the ESP-Claw, network, and model service configured in the previous lesson, and open the device management address shown on the K10. You do not need to flash the Mind+ firmware again for this lesson.

The following tasks require any coding Agent that can read materials and create and save files, such as WorkBuddy, Codex, TRAE, or Cursor. After signing in, create a dedicated project folder and place this lesson's materials in it.

NOTE: The computer-side Agent creates the Skill files; ESP-Claw uses them on the K10. Saving files on the computer does not install them on the K10. This project explains the method, not how to use a specific coding Agent.

4 Hands-on Practice

Task 1 Download, Install, and Use an Existing Button Skill

Procedure

First, we need to teach ESP-Claw how to use the buttons by downloading an existing Skill from the Skills Lab.

STEP1: Find the Button Skill

Open the ESP-Claw Skills Lab (https://skills-lab.esp-claw.com/), search for unihiker, and find "UNIHIKER Button (XL9535)". This Skill reads the status of Buttons A and B on the K10.

image16.png

STEP2: Download and Install

Click Download, open the Skill details, and send its installation command to the ESP-Claw chat window (see Project 37):

"Download the following Skill from the ESP-Claw Skills Lab: unihiker_button"

image17.png

image18.png

After installation, ask the assistant to list the actual installation path and confirm that it can find the Skill.

STEP3: Invoke the Skill and Check the Buttons

Now test the Skill. Send: "When A is pressed, show 'Start' in the center of the K10 screen for 3 seconds, then clear it. When B is pressed, show 'Stop' for 3 seconds, then clear it."

Test the Result

After the program starts successfully, press Buttons A and B in turn and observe the results.

image19.png image20.png

Task 2 Create a DFR0548 Expansion Board Motor-Control Skill

Procedure

Because there is no existing Skill for this expansion board, the Agent cannot yet control the motor through it. Next, we will create the required Skill.

STEP1: Install the Skill-Creation Tool

Use your coding Agent to open https://github.com/YeezB/espclaw-skill-writer and download the repository. Alternatively, locate espclaw-skill-writer in the resource package, send it to your coding Agent, and ask the Agent to install it.

image21.png

STEP2: Prepare the Materials and State the Requirements

Give the coding Agent the expansion board's programming files and ask it to use them when writing the Skill. For example, send the prompt below:

image22.png

STEP3: Check the Generated Files

Check whether the Agent generated the directory structure shown below, and ask it to explain the purpose of each file.

dfr0548_board/

SKILL.md

scripts/

motor.lua

STEP3: Deploy to the ESP-Claw UNIHIKER K10 for Testing

Upload the complete Skill folder to the current firmware's skills directory. Refresh or load it, then confirm that ESP-Claw can find it.

Follow these steps:

(1) In the left sidebar, click 'File Management' to open the file management page. Then click skills to open the Skill storage directory.

image23.png

(2) The Skill directory is protected by default. Enable Developer Mode, then create a new Skill folder.

image24.png

Next, upload SKILL.md, create a scripts folder, and upload the Lua file.

image25.png

image26.png

image27.png

After the upload is complete, click Refresh.

STEP4: Install and Test the DFR0548 Expansion Board Motor-Control Skill

After uploading, ask ESP-Claw to find the Skill, then send: "Press Button A to start the motor and Button B to stop it."

image28.png

Test the Result
ActionExpected Result
Start monitoring; no button pressedThe motor remains stopped
Press and release Button AThe motor starts and keeps running after release
Press and release Button BThe motor stops and remains stopped after release

image29.png

NOTE:

• If I2C is not detected, use the I2C address scanner in Mind+ and check the serial output. Adjust the Skill if needed, then flash the ESP-Claw firmware again.

• For other sensor Skills, find the .h header in the code generated by Mind+. Download the library and locate it in the installation path (default: \Arduino\libraries).

 image31.png

Knowledge Base

Next, use this lesson's project to understand how a Skill adds capabilities to an Agent.

 

Why the Motor Cannot Be Used Immediately After Connection

A model may know what a motor is, but not which board or port is connected, or whether a control program exists. Accurate hardware information, an executable program, and usage instructions turn "start the motor" into a real action.

image32.png

What Is a Skill

 

A Skill organizes a capability's purpose, timing, and method for an Agent. We install the existing button Skill and use a coding Agent to add the missing DFR0548 Expansion Board Motor-Control Skill. The combined program can reuse the button code.

Adding a Skill does not retrain the model; it gives the Agent instructions and an execution method. Similar names do not guarantee compatibility, so verify the exact hardware model and runtime environment.

 

How the Instruction File and Executable Program Work Together

 

SKILL.md tells the Agent when to use the Skill, which program to run, and what parameters to pass. The Lua program reads the buttons, controls M1, and returns the result. A coding Agent creates these files; ESP-Claw on the K10 reads and runs them.

image33.png

 

 

Current Tutorial: Click Here

icon project 38.rar 195KB Download(0)
License
All Rights
Reserved
licensBg
0