Arduino Due, Zero, and MKRZero

The Arduino Due, Arduino Zero, and Arduino MKRZero are all based on the SAM/SAMD processors. These are Atmel/Microchip implementations of the 32-bit ARM core, and offer higher clock rates and more memory than their AVR chips.

Because the SAM/SAMD chips are 32-bit processors note the following differences:

  • Lisp cells are 8 bytes.
  • Integers are 32 bits, so have the range 2147483647 to -2147483648.
  • Strings are packed more economically, four characters per Lisp cell.

Note also that they are 3.3V processors, and the I/O lines could be damaged by higher voltages.

Arduino Due

The Arduino Due is currently the fastest platform capable of running uLisp. It is based on the Atmel SAM3X8E ARM Cortex-M3 CPU, with 512 KB flash memory, 96 KB RAM, and an 84 MHz clock:

ArduinoDue.jpg

The above version is a clone from Geekcreit, available from Banggood [1].

LEDs

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

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

Run it by typing:

(blink t)

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 ~.

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

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 (x)
  (pinmode 13 t)
  (digitalwrite 13 x)
  (delay 1000)
  (blink (not x)))

Run it by typing:

(blink t)

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 ~.

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)
  (b (not x)))

Run it by typing:

(blink t)

Exit from the program by entering ~.


  1. ^ Geekcreit DUE R3 32 Bit ARM on Banggood.