The main objective of this document is to serve as a step-by-step guide on how to use some Seeed Studio® XIAO Series Boards with MicroBlocks® (block-coding real-time software). (I hope) Maybe soon, Seeed® and MicroBlocks will start working together, and this document will become somehow kind of obsolete.
But the truth is that understanding this process opens the possibility of using not only XIAO but also any other Microcontroller Unit (MCU) compatible board with MicroBlocks or even gives you some ideas on how to design your own physical computing system.
Step 1: Verify your board Microcontroller Unit (MCU) is compatible with MicroBlocks (MB) Virtual Machine (VM)In the next list you can see the MB-supported boards and their respective MCUs. With this information you can compare if the MCU of your board is the same model as any of the list; if it is the case, you have good chances of success.
- BBC micro:bit—nRF52833 or nRF51822-QFAA-R rev 3
- Calliope mini - nRF52833
- Adafruit Circuit Playground Express - ATSAMD21 ARM Cortex M0
- Adafruit Circuit Playground Bluefruit - nRF52840 Cortex M4
- Adafruit Clue - nRF52840
- Citilab's ED1 - ESP32
- M5Stack Grey - ESP32
- NodeMCU - ESP8266
- ESP32
- Raspberry Pi Pico - RP2040
(Here you can see the source of the information and official list of MicroBlocks-compatible boards.)
On the XIAO Boards side, there are many MCU versions that you can see here. So at least 4 versions has MCU in common (Microchip SAMD21, Raspberry Pi RP2040 and the two Nordic models).
Step 2: Find your equivalent MB board flashing procedure and try to replicate it with your board.Since this is a practice-focused tutorial, instead of only seeing the available documentation and figuring out if there are opportunities and limitations, let's first make something in the field.
I'll try with XIAO SAMD21 and XIAO RP2040. So the board equivalent is the CPX and RPi Pico. In this link down in the board section, you can find the flashing processes for all the board flavors.
In the CPX board you have to double-click on the reset button, the equivalent process in the XIAO Board is not a button, but two terminals that you can connect with a conductive bridge. As you can see in the example video, a jump wire works well.
In the RP2040, you have to press the reset button before you plug in the computer.
If you need more detailed information about the bootloader modes of XIAO, you can find it on his wiki.
For these two boards, once in bootloader mode, you just need to open MB and flash the XIAO board, selecting the equivalent board, and then this icon should change, so now your board has the MB virtual machine on it!
Safety Note: In case something goes wrong, it is recommended to have the original bootloader files, tools, and processes for reverting to the initial state.
Step 3: Verify the functional pinsIn some cases the MB VM works for boards with specific communication ports or with some components already attached to some pins, like leds, sensors, screens, etc.
With your equivalent board you can have many different arrangements and have some pins incompatible, but I hope that all the pins you need stay available. For the comprobation, even though there are some reverse engineering methods, I do recommend finding the schematic drawings of both boards so you can directly verify each pin.
Fortunately XIAO and many (or maybe all) of the MB-supported boards have documentation available, so I could verify the pins one by one.
Let's review my case. For the XIAO SAMD21, I got this file from the Seeed Studio wiki:
And for the Circuit Playground Express board, I got this file from the Adafruit Learning System Documents.
From the first schematic I can see that the external pin labeled as 0, corresponds to the internal pin PA02, which in the CPX schematic corresponds to the external A0 pin, with an speaker attached, the speaker is a classical and simple communication component, so it is probably that works, with a coincidence in the number.
For the pin comprobation, you can use the following code or something similar, depending on your testing component:
In this case, it works! and as a coincidence, with the same pin number (0). Verifying the other available pins. In the comment block, you can read the XIAO pin, and in the third block, you can see his equivalent pin. After testing all the pins of this board, I got the following results:
As an application of the results, now viewing this image, I know that the XIAO pin labeled as 10 works in MB with the number 2.
Next you can see the results for the XIAO RP2040:
In this way, it's like I've achieved work with this and other boards.
I hope this motivates you to work with Microblocks and XIAO Boards; both are really amazing projects on the state-of-the-art of educational technologies, with a really low-floor learning access but with high-ceiling project possibilities. Happy Prototyping!! :)







Comments