A (patched) version of the Lisp programming language for ESP32-based boards. Heavily customized to fit my use case but most of the original remains. For more about the original ulisp-esp see http://www.ulisp.com/show?3M#esp-version
This is based off of uLisp 4.6. For the old patches (some of which don't work) for uLisp 4.3a please see the 4.3a-old branch.
[!NOTE] This version includes (requires?) the ESP32Servo library to get the analogWrite() and tone() functioning correctly. If you don't have it installed uLisp will compile but you won't have analogWrite() and tone().
New features, some care in editing required:
calloc()
) may not be portable to other platforms(throw)
and (catch)
(*)Copy-paste ready features (all in extensions.hpp
):
Also included is David's bigint library and the example (now)
function.
Other patches:
main.lisp
(on microSD card) at startupcheckargs()
because it is automatically called[!CAUTION] If you are looking to use this patched version as a guide for adding any of the 3 starred (*) features listed above, please use this guide I prepared instead. There are many subtle changes in my patched version that are understandable to me, but will no doubt cause confusion for someone who is just copy-pasting my code. The aforementioned document is structured and designed to allow copy-pasting into vanilla uLisp without major problems arising.
term.py
-- enhanced uLisp interfaceThis provides a cleaner interface to use uLisp in compared to the stupid Arduino serial monitor.
Dependencies:
To run:
# use default port and baud (/dev/ttyUSB0 and 115200)
python3 term.py
# specify port and baud
python3 term.py -p COM3 -b 9600
UI Overview:
----------------------------------------------------
| ^| ^|
| | |
| LISP | SERIAL |
| BUFFER | MONITOR |
| | |
| | |
| v| v|
|--------------------------------------------------|
|cmd> COMMAND AREA |
|--------------------------------------------------|
| STATUS BAR RIGHT STATUS |
| MEMORY USAGE LAST GC INFO |
----------------------------------------------------
.reset
: Trips the RTS line of the serial port, to reset your microcontroller if it locks up and ~
doesn't work..run
: Sends the contents of the Lisp Buffer to the serial port, and then empty the Lisp Buffer..quit
: Closes the serial port, and exits from the application.$!rs=foo!$
, it will hide that string in the Serial Monitor, and put foo
in the Right Status area. This is useful if you want to monitor the state of a pin in a loop, and you don't want to overload the Serial Monitor with a barrage of text.