Version 2.6 of uLisp supports the Maxim MAX32620FTHR board, which is based on the MAX32620 96 MHz ARM Cortex M4F microcontroller:
The board provides 2048 KB flash and a generous 256 KB RAM. It includes a JST socket for a Lipo battery, and provides several features ideal for battery-operated applications: a MAX77650 SIMO Buck-Boost PMIC for power conversion and battery management, and a MAX17055 Fuel Gauge to measure battery life .
Uploading uLisp from the Arduino IDE
- Install the Arduino Core as described on Maxim's GitHub page .
- On the Boards menu, under the heading Maxim-ARM (32 bits) Boards select MAX32620FTHR(Native USB port).
- Connect the board to the computer via USB.
- Press and hold the Boot button on the board.
- Press and release the Reset button.
- After the LED turns on release the Boot button.
- Upload the ARM version of uLisp.
The MAX32620FTHR board provides three I2C ports, although only Wire1 is accessible from the Arduino core and hence from uLisp. The MAX17055 Fuel Gauge (address #x36) and MAX77650 PMIC (address #x48) are on I2C port 2.
There are three SPI ports, although only SPI2 is accessible from the Arduino core and hence uLisp.
There are three serial ports, one of which is accessible through the Arduino IDE Serial Monitor.
Details of the board are given in the MAX32620FTHR Wiki: MAX32620FTHR.
The MAX32620FTHR board has an RGB LED connected to pins 20 (red), 21 (green), and 22 (blue). For example, you can make it blue by evaluating:
(digitalwrite 22 0)
The following program cycles all three LEDs through the 8 different combinations of colours:
(defun rgb () (let ((leds '(20 21 22))) (mapc (lambda (p) (pinmode p t)) leds) (loop (dotimes (x 8) (mapc (lambda (p) (digitalwrite p (logand x 1)) (setq x (ash x -1))) leds) (delay 1000)))))
Run it by typing:
Exit from the program by entering ~.
All the I/O pins can also be used with analogwrite, so you can make the LED faint blue with:
(analogwrite 22 240)
For an analogue version of the above rgb program that you can run on the MAX32620FTHR board see Mood light.