Page 200 - The Unofficial Guide to Lego Mindstorms Robots
P. 200

189


          10
          legOS


          In this chapter:

          • About legOS

          • Development Tools

          •  Hello, leg OS

          • Function Reference

          • New Brains For Hank

          • Online Resources


          legOS is the most  powerful development tool available for the RCX.∗ If programming environments were cars, RCX Code
          would be a plastic tricycle,  NQC would be a comfortable  sport/utility  vehicle, and pbFORTH would probably be an eco -
          conscious alcohol-burning car with a Grateful Dead bumper sticker. legOS would be a fire-breathing, smoke-snorting monst er
          truck with a roaring engine and no muffler. legOS offers you the ability to program  your RCX in assembly language, C, or
          C++, If you've been wanting to implement a neural network on yo ur RCX, here's your chance. With legOS, you have direct
          control of the inputs and outputs, display, IR port, and memory of the RCX. There' s a lot of power here.

          T he flip side, of course, is that legOS is harder to use than any of the other programming environments. Unless you're already
          running Linux and using GNU development tools, you'll have to spend some time configuring your system to support legOS
          development.

          In  this chapter, I'll talk about what software you need to develop legOS programs and what alternatives are available. I'll
          describe the legOS  services and present some sample code. I won't attempt to describe C, which is well-documented in other
          p ublications. If you don't already know C, you might want to work your way through a tutorial before reading this chapter.

          About legOS
          legOS is replacement firmware that completely replaces the default RCX firmwar e that LEGO gives you. Like pbFORTH, it
          o ffers full control of the RCX. If you're already familiar with C, you may be more comfortable running legOS than pbFORTH.

          ∗ For updated information on legOS, please see http://www.oreilly.com/catalog/Imstorms/ .
   195   196   197   198   199   200   201   202   203   204   205