Rcxlisp User Manual
Total Page:16
File Type:pdf, Size:1020Kb
RCXLisp User Manual Version 1.3 22 October 2003 © MMII,MMIII, Frank Klassner Dedicated to my AI students, who, since the Fall of 1999, have bravely participated in my quest to make Lego MindStorms a viable platform for collegiate computing curricula. 1 TABLE OF CONTENTS INTRODUCTION ...............................................................................................................................................................1 INSTALLATION.................................................................................................................................................................3 PC INSTALLATION.............................................................................................................................................................3 MAC INSTALLATION..........................................................................................................................................................4 REMOTE RCXLISP...........................................................................................................................................................6 A LIMITED COMMON LISP INTRODUCTION.........................................................................................................6 Optional Arguments....................................................................................................................................................6 Keyword Arguments....................................................................................................................................................7 Using LispWorks.........................................................................................................................................................8 THE “REMOTE RCXLISP” LANGUAGE..................................................................................................................10 Common Lisp I/O Streams & “Remote RCXLisp”................................................................................................................ 10 “Remote RCXLisp” Stream Argument Convention............................................................................................................... 11 Return Values of “Remote RCXLisp” Functions................................................................................................................... 11 RCX::*standard-rcx-io* .......................................................................................................................................................... 15 alivep ........................................................................................................................................................................................ 16 battery-power ........................................................................................................................................................................... 17 change-rcx-id............................................................................................................................................................................ 18 clock.......................................................................................................................................................................................... 19 clock-hour................................................................................................................................................................................. 20 clock-minute............................................................................................................................................................................. 21 current-program........................................................................................................................................................................ 22 download-executable ............................................................................................................................................................... 23 download-firmware.................................................................................................................................................................. 25 effector...................................................................................................................................................................................... 26 firmware ................................................................................................................................................................................... 27 message..................................................................................................................................................................................... 28 play-system-sound ................................................................................................................................................................... 29 play-tone................................................................................................................................................................................... 30 rcx-compile-and-download...................................................................................................................................................... 31 rcx-compile-file........................................................................................................................................................................ 32 rcx-compile-formlist ................................................................................................................................................................ 33 read-rcx-executable.................................................................................................................................................................. 34 send-message............................................................................................................................................................................ 35 sensor........................................................................................................................................................................................ 37 set-clock.................................................................................................................................................................................... 38 set-clock-fields......................................................................................................................................................................... 39 set-clock-hour........................................................................................................................................................................... 40 set-clock-minute....................................................................................................................................................................... 41 set-current-program.................................................................................................................................................................. 42 set-effector-state....................................................................................................................................................................... 43 set-sensor-state......................................................................................................................................................................... 44 set-transmit-range..................................................................................................................................................................... 47 set-var ....................................................................................................................................................................................... 48 shutdown .................................................................................................................................................................................. 49 start-rcx-program ..................................................................................................................................................................... 50 start-rcx-thread......................................................................................................................................................................... 51 start-timer ................................................................................................................................................................................. 52 stop-rcx-thread ......................................................................................................................................................................... 53 timer.......................................................................................................................................................................................... 54 using-rcx................................................................................................................................................................................... 55 var ............................................................................................................................................................................................. 56 with-open-com-port