In case someone else has a PyGamer that suffers from serial port overruns, the following patch against uLisp ARM Version 4.1 points load-image
, save-image
, and with-sd-card
, to the PyGamer’s Micro-SD card interface when sdcardsupport
is enabled.
--- ulisp4PyGamer.ino.41 2022-01-29 13:21:01.036120575 +0000
+++ ulisp4PyGamer.ino 2022-01-30 14:04:58.825125057 +0000
@@ -88,7 +88,11 @@
#define DATAFLASH
#define FLASHSIZE 2048000 /* 2 MBytes */
#define CODESIZE 256 /* Bytes */
+#if defined(ARDUINO_PYGAMER_M4) && defined(sdcardsupport)
+ #define SDCARD_SS_PIN 4
+#else
#define SDCARD_SS_PIN 10
+#endif
#define STACKDIFF 400
#define CPU_ATSAMD51
I use the above on my system with the following load
library function, based on uLisp - SD card interface, to load Lisp programs from the SD card.
"(defun load (filename)"
" (with-sd-card "
" (s filename)"
" (loop"
" (let ((f (read s)))"
" (print f)"
" (if (not f) "
" (return)"
" (eval f))))))"