Frank Klassner


Title:  LISP and Lego MindStorms: Perfect Together?



Educators’ experience with hands-on robotics projects in specialized courses has shown that students' motivation to learn computing principles in any language increases significantly when they have the opportunity to apply those principles in constructing robots and designing problem-solving code. Unfortunately, until recently the high cost of robotics kits (often $5000 apiece in the early 1990s), led most liberal arts computer science departments to either avoid the use of robotics altogether or restrict the use of a few expensive robots to one small upper-level course.  Since the middle 1990’s, several manufacturers have released standardized, low-cost robot platforms. Among the more recent models are ActivMedia’s Pioneer robot [1], MIT’s HandyBoard and Cricket controller cards [11], and LEGO’s MindStorms kit. In this paper I explain the ongoing efforts at Villanova University to mould LEGO MindStorms into a suitable platform for college students to investigate a broad range of computer science and artificial intelligence topics within the Common LISP programming language. I selected LEGO MindStorms for four reasons:



1.   Cost: A single MindStorms kit, with 750 construction pieces, sensors, and programmable hardware, costs approximately $200 and thus is one quarter the cost of a HandyBoard-based robot kit and one tenth the cost of a ActivMedia-based robot kit – two of the more commonly used platforms in colleges.

2.   Flexibility: The MindStorms platform supports a suite of reusable snap-together sensors, effectors, and building blocks that can serve as the basis for a wide variety of programming projects.

3.   Student Interest: Many students have played with LEGO building blocks as children, and therefore they are intrigued with working on LEGO-based projects.

4.   Professional Curiosity: As a Common LISP programmer, I wondered whether the students’ interest in MindStorms could be harnessed to present several Common LISP language features from a new perspective.


This paper first describes the range of projects and concepts in Lisp, artificial intelligence, and computer science that a robotic platform should cost-effectively support in undergraduate curricula. The second section of the paper discusses the basic MindStorms kit and its strengths and weaknesses with respect to these needs. Based on this evaluation, the paper then presents RCXLisp, a Common Lisp library that we have developed to fill the holes in MindStorms’ capabilities. The library has two features that distinguish it from other third-party packages and languages designed by hobbyists for programming the MindStorms platform. The first is that they were developed to support both remote control and on-board programming of MindStorms robots. The second is that they work with an extended firmware developed at Villanova to support targeted communication between multiple LEGO robots and command-center desktops rather than the broadcast protocol supported by standard LEGO MindStorms firmware. The paper concludes with a discussion of future development plans for RCXLisp.



LEGO MindStorms and RCX are trademarks of the LEGO Group, which does not sponsor, authorize, or endorse any of the third-party work cited in this article. The author of this article has no financial relationship with the LEGO Group.

This material is based upon work supported by the National Science Foundation under Grant No. 0088884. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author and do not necessarily reflect the views of the National Science Foundation.