Arduino M0 Boards

The Arduino Zero and Arduino MKRZero are based on the SAMD21 ARM Cortex-M0+ core and provide 256 Kbytes of flash and 32 Kbytes of RAM. They save images to the program flash.

Arduino Zero

The Arduino Zero is based on the Atmel SAMD21 ARM Cortex M0+ CPU, with 256 KB flash memory, 32 KB RAM, and a 48 MHz clock:

ArduinoZero.jpg

Connect to the Programming USB port to use uLisp, as this corresponds to Serial, or to use the Native USB port compile uLisp with the directive:

#define Serial SerialUSB

LEDs

Like the Arduino Due, the Arduino Zero has an orange LED connected to the digital pin 13 which you can flash with the following program:

(defun blink (&optional x)
  (pinmode 13 :output)
  (digitalwrite 13 x)
  (delay 1000)
  (blink (not x)))

Run it by typing:

(blink)

Pin 13 can also be used as an analogue pin, so you can pulsate the orange LED slowly on and off with the program:

(defun pulse ()
  (let (down)
    (loop
     (dotimes (x 256) 
       (delay 5) 
       (analogwrite 13 (if down (- 255 x) x)))
     (setq down (not down)))))

Run it by typing:

(pulse)

Exit from either program by entering ~.

Wemos SAMD21 M0

The Wemos SAMD21 M0 board is compatible with the Arduino Zero M0 [1]:

WemosM0.jpg

To reduce cost it has only one programming port, and no debug port. I recommend using the Arduino MKRZERO board option to use this board.

Note that earlier versions of this board didn't seem to talk to the Arduino IDE correctly (and incidentally, had an annoyingly bright red power LED). Recent boards seem to work fine (and have a nice faint power LED).

Arduino MKRZero

The Arduino MKRZero is similar to the Arduino Zero, but in a smaller form-factor board. It also includes a micro-SD card socket, allowing an SD card to be used for saving and loading uLisp images:

ArduinoMKRZero.jpg

LEDs

The Arduino MKRZero has an orange LED connected to the digital pin 32 which you can flash with the following program:

(defun blink (x)
  (pinmode 32 t)
  (digitalwrite 32 x)
  (delay 1000)
  (blink (not x)))

Run it by typing:

(blink t)

Exit from the program by entering ~.

Wemos SAMD21 M0-Mini

A similar compact ATSAMD21-based board is the Wemos SAMD21 M0-Mini Module [2]:

WemosSAMD21Mini.jpg

It works with the Arduino IDE; I got good results with the Boards Manager Arduino MKRZERO option, and the performance with uLisp is identical to the Arduino MKRZERO.


  1. ^ Wemos SAMD21 M0 board on Banggood.
  2. ^ Wemos SAMD21 M0-Mini Module on Banggood.