Notes of Rasmus Johanson

SAMD21 M0-Mini & CircuitPython

24 Feb, 2021

SAMD21 M0-Mini is a cheap clone of Arduino M0-mini sold under various names and sellers. RobotDyn offers the same board with and without CircuitPython support. Accidentally I ordered units without one and the following is how to get UF2 bootloader and CircuitPython working on these devices. If you want to skip the following, make sure you order a board with CircuitPython. It will cost you a few more bucks, RobotDyn offers both.

Create code.py and test if the board's integrated LED starts blinking fast:

import board
import digitalio
import time

led = digitalio.DigitalInOut(board.D13)
led.direction = digitalio.Direction.OUTPUT

while True:
    led.value = True
    time.sleep(1)
    led.value = False
    time.sleep(0.2)
    led.value = True
    time.sleep(0.2)
    led.value = False
    time.sleep(0.2)

You can always unmount CIRCUITPY and go back to bootloader by double tapping the only button of the board.

More useful information about the board by Bryan Lavery.