The new sleep function in uLisp 2.1 opens up the possibility of using uLisp in battery-powered applications, such as in data acquisition.
The following program tests the current consumption while sleep is running:
(defun low ()
(let* ((pin 32)
(fla (lambda ()
(digitalwrite pin t)
(digitalwrite pin nil)
(pinmode pin t)
It runs for 10 seconds using delay, flashes the LED twice, and then puts the processor to sleep for 10 seconds using sleep.
Using an ATmega1284P running uLisp on a prototyping board the current consumption drops from 22mA at 5V using delay, to 70µA using sleep: