Micropython for XIAO ESP32C6
MicroPython is a lean and efficient implementation of the Python 3 programming language that includes a small subset of the Python standard library and is optimised to run on microcontrollers and in constrained environments.
In this page, we will guide on how to use the the XIAO ESP32C6 capability using the simple and easy syntax from micropython.
Hardware Preparation
I am using Seeed Studio XIAO ESP32C6 board here.
| Seeed Studio XIAO ESP32C6 |
|---|
![]() |
Software Preparation
In this guide I will be using windows 10 alongside with Thonny IDE and esptool. In order to use esptool make sure to install Python 3 environment on your windows OS. Before getting started make sure to download the firmware and Install Thonny
| Thonny IDE | Firmware and Sample Code |
|---|---|
👍 Greatly Thanks
The firmware designed for XIAO ESP32C6 board, using in this wiki is made by our friend: Zhishuo Song, whom we are really greatful for.Getting Started
The firmware is designed only for XIAO ESP32C6 MicroPython programming. We will first flash the firmware and then use the example on it.
Step 1. Flashing the firmware
Locate the usb to serial port address by opening the device manager

Extract the downloaded zip file and navigate to the folder.

click On the path box then type "CMD" and press enter

You will be directed to cmd terminal.

Install esptool using pip command (make sure python 3 is already installed)
pip install esptool

Before flashing, you must put the XIAO ESP32C6 into bootloader (download) mode. To do this:
- Press and hold the BOOT button.
- While holding BOOT, press and release the RESET button.
- Release the BOOT button.
If the board is not in bootloader mode, flashing will fail with a "Write timeout" error and may brick the module.
Erase the flash memory on the XIAO ESP32C6 using this command
esptool --port COMXX --chip esp32c6 erase-flash
Now proceed to install the micropython firmware using this command
esptool --port COMXX --baud 460800 --before default-reset --after hard-reset --chip esp32c6 write-flash --flash-mode dio --flash-size detect --flash-freq 80m 0x0 ESP32C6_MicroPython.bin
Change the COMXX with the port COM number on your PC. If flashing fails with a timeout error, try lowering the baud rate to 115200.

Step 2. Upload the example code
Now we will upload the example code to XIAO ESP32C6 internal flash memory.
For this part I am using thonny IDE first I configure the port

run blinker.py example program

NTP get now time from wifi
step1: Open wifi_Ntp.py file on Thonny

step2: change you wifi router ssid and password on line 8

step3: run code
When running the program, you can see in the shell window that the XIAO is connected to the specified wifi and get the NTP network time.

Troubleshooting
- "Write timeout" or serial exception error: Make sure the board is in bootloader mode before flashing. Hold the BOOT button, press and release RESET, then release BOOT. You should also try lowering the baud rate (e.g., use
--baud 115200instead of460800). - Command not found (
esptool.py): Useesptool(without.py) when installed viapip install esptool. On some systems, you may need to usepython -m esptoolinstead. - Bricked module: If the module appears bricked, try entering bootloader mode and erasing the flash with
esptool --port COMXX --chip esp32c6 erase-flash, then re-flash the firmware.
✨ Contributor Project
- This project is supported by the Seeed Studio Contributor Project.
- Thanks Hendra and shariltumin efforts and your work will be exhibited.
Tech Support & Product Discussion
Thank you for choosing our products! We are here to provide you with different support to ensure that your experience with our products is as smooth as possible. We offer several communication channels to cater to different preferences and needs.
