Page 182 - The Unofficial Guide to Lego Mindstorms Robots
P. 182
171
code = 13, "Sensor boolean", _
code = 14, "Watch", _
code = 15, "IR message" _
)
End Function
T his example, of course, is really just a jumping-off point. You may want to make the following enhancements:
• Integrate Save Datalog into a form to create a user-friendly application.
• Modify the o utput file format to suit your own needs.
Online Resources
L EGO Programmable Bricks Reference Guide
http://www.legomindstorms.com/sdk/
This official document from LEGO describes Spirit.ocx in detail. Although LEGO calls it a Software Development Kit (SDK),
it 's not really a big deal. There's a PDF file of the Technical Reference Document, which is 112 pages of reference material
describing every function in Spirit.ocx. There are also some Visual Basic files that you can download and experiment with,
including a file of handy constant definitions.
L EGO on my mind: Roboworld
http://homepages.svc.fcj.hvu.nl/brok/legomind/robo/
This is the robotics area of Eric Brok's excellent site. There are actually two relevant resources here. The first is an outstanding
in troduction (the "Spirit programming" link) to using Spirit.ocx from Visual Basic. The second resource is "Mind Control" a
programming environment that interprets Visual Basic-like programs and can download them to the RCX.
L ego Robotics Course
http://emhain.wit.ie/~p98ac25/
This tutorial, created as a course handbook at the Waterford Institute of Technology in Ireland, provides a gentle introduction
to Visual Basic and programming with Spirit.ocx. It's available as a PDF file, either in one big chunk or in separate pieces. The
document describes how to work in the Visual Basic environment, how to use VB to talk to the RCX, and even includes
several sets of instructions for building robots that you then program with VB.
Bot-Kit
http://www.object-arts.com/Bower/Bot-Kit/Bot-Kit.htm
Bot-Kit, developed by Andy Bower, is glue that allows you to program your RCX using Smalltalk, a popular object-oriented
programming language. To use Bot-Kit, you will need Dolphin Smalltalk, which is a Smalltalk implementation for Windows.
Links are provide on the Bot-Kit web site for obtaining Dolphin