MicroPython
UNIHIKER K10 with MicroPython¶
MicroPython is a Python interpreter that runs on microprocessors, enabling users to write Python scripts to control hardware. It is highly consistent with the standard Python interpreter (CPython) in terms of syntax and runs on microprocessors with limited resources. In this tutorial, we will guide you through the process of downloading and installing MicroPython and its IDE "Thonny" on your computer.

Note
Before using micropython to program the UNIHIKER K10, the Micropython firmware has to be uploaded into the UNIHIKER K10.
Flash Download Tool now only support on Windows. MacOS/GNU Linux user can flash firmware by ESP LAUNCHPAD.
For users who prefer block-based programming, we recommend using Mind+ V2 to flash the MicroPython firmware. For users who prefer other MicroPython code editors, we recommend using the Flash Download Tool or ESP LAUNCHPAD to flash the MicroPython firmware.
Flash MicroPython Firmware on Windows via Mind+ V2¶
Note
The current version (0.9.8) of AI featuresβincluding facial recognition, cat/dog recognition, and QR code recognition consumes significant hardware resources. Therefore, simultaneous use of AI and WiFi functionality is not supported at this time.
Download¶
| Download | |
|---|---|
| Mind+ V2 | Click to download Mind+ V2 |
-
Expand and select the 0.0.5 version (or higher) of UNIHIKER K10 in the lower left corner and install it. After the installation is complete, select UNIHIKER K10.

-
Then, press and hold the BOOT button on the back of the K10 and connect it to the computer via USB.
-
Return to the previous interface, click on the device connection, then click on Erase, Burn -> 0.9.8. Flash the firmware

-
Wait until the terminal on the lower right corner is finished burning the code. When "Hard resetting via RTS pin..." appears, it indicates that the burning is complete. At this point, you can click the RST button behind K10 to perform a hardware reset. Then, click the connection again to connect the UNIHIKER K10 in the MicroPython mode.
Flash MicroPython Firmware on Windows via Flash Download Tool¶
Download¶
| Download | |
|---|---|
| MicroPython Firmware: | Google Drive Download(0.9.8) Google Drive Download(V0.9.2) Google Drive Download(V0.5) |
| Flash Download Tool(Only support windows): | Click to download |
| ESP LaunchPad(Web Tool For All OS): | Click to visit |
| Thonny | Click to download |
- Click to open the Flash Download Tool, then choose the ESP32-S3.![]() |
-
Select the firmware and fill up the address with 0x00, then click on β.

-
Press and hold the BOOT button on the back of K10, connect the board to the computer and select the corresponding port in the software.
- First click "ERASE" to clear the flsh, and then click "START" to flash the firmware after ERASE step is successful.
- Press the RST reset button on the K10 board after the flash is completed.
Flash MicroPython Firmware on Mac/GNU Linux¶
- Visit ESP LAUNCHPAD
- Press and hold the BOOT button on the back of K10, connect the board to your Mac/PC then release BOOT button.
- Click "connect" to choose the port.

- Enter the "DIY" page and choose the .bin firmware which downloaded from Google Drive.
- Change the Flash Address into 0x00
- Click "Program" to flash firmware.

Coding¶
- Open up Thonny as the MicroPython Editor.
from unihiker_k10 import screen
import time
from k10_base import Camera
camera = Camera()
camera.init()
screen.init(dir=2)
screen.show_camera(camera)
screen.show_bg(color=0xFFFF00)
screen.set_width(width=5)
screen.draw_line(x0=0,y0=0,x1=80,y1=80,color=0x0000FF)
screen.draw_point(x=100,y=10,color=0xFF0000)
screen.draw_rect(x=120,y=100,w=80,h=120,bcolor=0xFF6666,fcolor=0x0000FF)
screen.draw_rect(x=120,y=100,w=40,h=60,bcolor=0x012345)
screen.draw_circle(x=80,y=80,r=40,bcolor=0x00FF00,fcolor=0x0000FF)
screen.draw_circle(x=80,y=80,r=20,bcolor=0xFF0000)
screen.draw_text(text="Hello\n23",x=10,y=0,font_size=24,color=0xFF0000)
screen.draw_text(text="line\n456\nhgjh\n",line=2,font_size=24,color=0xFF0000)
screen.show_draw()
time.sleep(2)
screen.clear()
while True:
time.sleep(1)
-
CTRL+S to save to micropython device. Choose to save to This computer is also fine, but if the program save to local computer, the program will be lost after K10 was reboot, it is more suitable for saving to the computer when debugging.

MicroPython Example¶
Cklik to the MicroPython Block Example or MicroPython Example.
Flash back to Arduino C firmware¶
The original firmware for K10 is ArduinoC firmware, supports development in Arduino environments such as Mind+/Arduino IDE. If you want to switch back to Arduino development after using MicroPython, we offer the following two methods for you to flash the Arduino C firmware:
Method 1
Restore the device to the factory Arduino firmware in Mind+ V1.
Or click on erase after the K10 is connected to Mind+ V2. 
Note
Mind+ is available for Windows only at the moments.
Method 2
For the MacOS/GNU Linux user the Arduino C firmware can be flash back by using the Arduino IDE.
- Download and configure Arduino IDE by following this tutorial.
- Choose the model as "EN".

- Upload an empty program, like this one:






