Don't worry if you have never used a microcontroller before—just follow the steps below!
- Seeed Studio XIAO Series Board (XIAO RP2040 or XIAO SAMD21 is recommended)
- USB Cable (Type-C)
- Python 3.10+
- Windows 10 / 11
Purchase the Seeed Studio XIAO RP2040. It is widely available on Amazon, the official Seeed Studio Store, DigiKey, Mouser, or local hobbyist electronic shops for around $5–$8 USD.
- Go to the CircuitPython Official Website and search for your development board model.
- Download the latest
.uf2firmware file. - Connect the development board to your computer using a USB cable.
- Enter Bootloader Mode:
- XIAO RP2040: Press and hold the
BOOTbutton, press theRESETbutton once, then release both buttons. - A USB flash drive named
RPI-RP2will appear on your computer.
- XIAO RP2040: Press and hold the
- Directly copy the downloaded
.uf2file into this flash drive. - Once the copy is complete, the board will restart automatically, and the drive's name will change to
CIRCUITPY. - Or refer to the official tutorial
- Go to the CircuitPython Library Bundle and download the library bundle matching your CircuitPython version.
- Extract the downloaded zip file, and copy the following folder to the
CIRCUITPY/lib/directory:adafruit_hid/
CircuitPython does not enable serial data communication by default. You need to configure it manually:
Create (or edit) a file named boot.py in the root directory of the CIRCUITPY drive, with the following content:
import usb_cdc
usb_cdc.enable(console=True, data=False)After saving the file, press the RESET button on the board to apply the configuration.
Copy the code/code_for_xiao.py file from this project to the root directory of the CIRCUITPY drive, renaming it to replace the original code.py.
Once copied and saved, the board will automatically run the code. The serial monitor should display:
XIAO initialized, waiting for commands...
Open MapleScript, click Hardware Settings in the GUI, and you can select your RP2040 to bind it as the hardware keyboard and mouse for MapleScript.