Adafruit QT-Py and Seeduino XIAO

The ARM version of uLisp now supports two diminuitive ARM-based boards: the Adafruit QT-Py [1] and the Seeduino XIAO [2]. The boards are both based on ARM M0 SAMD21 processors running at 48MHz, with 256 Kbytes of flash and 32 Kbytes of RAM. They both have USB type C connectors, and identical form factors and pinouts:


Saving and loading the workspace

On the QT-Py and XIAO you can save the entire workspace to flash on the ATSAMD21 chip using save-image.

Adafruit QT-Py M0

The Adafruit QT-Py M0 [3] is based on the 32-pin ATSAMD21E18A, and is similar to the XIAO:


It has the following additional features:

  • NeoPixel RGB LED.
  • Stemma QT connector for connecting to I2C sensors and peripherals.
  • Reset button.

Use the Adafruit SAMD (32-bits ARM Cortex-M0+ and Cortex M4) Boards core, and the Adafruit QT PY (SAMD21) board option.

Analogue inputs

The QT-Py has 9 analogue inputs, on pins 0 to 3 and 6 to 10, with up to 12-bit resolution. Pin 1 can be used as AREF.

Analogue outputs

The QT-Py has 9 PWM analogue outputs, on pins 2 to 10, and a 10-bit DAC output, on pin 0.

NeoPixel RGB display

For information about driving the NeoPixel display from an assembler routine see: ARM NeoPixel driver using assembler.

Seeduino XIAO

The Seeduino XIAO [4] is based on the 48-pin SAMD21G18:


Use the Seeed SAMD (32-bits ARM Cortex-M0+ and Cortex M4) Boards core, and the Seeeduino XIAO board option.


The XIAO doesn't have a reset button; instead you have to short together two pads marked RST on the top of the board. Short them once to reset the board, or twice in quick succession to enter bootloader mode, when the orange LED will light up.


The XIAO has the following LED indicators:

Label Colour Function
P Green Power
L Orange LED-Builtin
R Blue RX
T Blue TX


The XIAO has an orange LED connected to digital pin 13 which you can flash with the following program:

(defun blink (&optional x)
  (pinmode :led-builtin t)
  (digitalwrite :led-builtin x)
(delay 1000) (blink (not x)))

Run it by typing:


Exit from the program by entering ~.

Analogue inputs

The XIAO has 11 analogue inputs, on pins 0 to 10, with up to 12-bit resolution. If you want to stay compatible with the QT-Py you should avoid using pins 4 and 5 for analogue input.

Analogue outputs

The XIAO has 10 PWM analogue outputs, on pins 1 to 10, and a 10-bit DAC output, on pin 0.

  1. ^ Adafruit QT-Py on Adafruit.
  2. ^ Seeeduino XIAO SAMD21 on Seeeduino.
  3. ^ Adafruit QT-Py guide.
  4. ^ Seeduino XIAO - Seeed Wiki.