PDA

View Full Version : Will the BS2 Work with LISP?



AIman
09-18-2006, 11:13 AM
·I am working on a project robot that I wanted to run using a BS2, however the program has quickly taken a life of its own and is being created in LISP. Is there a way to get the BS2 and LISP to work with each other?

http://forums.parallax.com/images/smilies/smhair.gif·

Chris Savage
09-18-2006, 11:23 AM
Hello,

·· If your LISP program can communicate serially, it would be possible to exchange some information back and forth that way.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support

Mike Green
09-18-2006, 11:33 AM
That depends on what you want to do. Keep in mind that the BS2 is somewhat limited in program size and very limited in the data that can be kept (other than in EEPROM which is limited in how often it can change). Lisp, on the other hand, is particularly powerful in that it can store lots of data in very complex structures and the data itself can sometimes be executed. The construction of programs and program fragments is an important part of the use of Lisp.



1) You can use Lisp for the development of the "higher level" functions and either
a) Run those functions on a processor that supports Lisp and have that and the BS2 communicate.
Consider something like a GumStix or similar embedded processor that can run Linux. Scheme is a
dialect of Lisp that is available on a variety of platforms (Windows, Mac, Linux) and is particularly well
suited for running in a relatively limited environment. It has been ported to the Palm OS for example.
b) See if you can translate the finished Lisp functions into some kind of simple interpretive code or tables
that can be "executed" on the BS2. Truthfully, a BS2 is probably too small for this. You'd need something
like a BS2p or BS2px to get a little more speed and a lot more memory (as EEPROM).