Core Lego Mindstorms Programming
The Mindstorms kit is for those people who have always wanted to play with robots, but couldn't find any time between work and home. In short, its a kit tailor made for programmers, not for those people with Mensa level IQs who know how to build an H-bridge circuit or a voltage regulator from scratch. Probably the easiest and most understood programming language right now is Java, and that is the language this book focuses on. The book introduces leJOS, which is a Java Virtual Machine (JVM) and operating system rolled into one. It's the first JVM I've seen to run in the tiny space of only 32kb. As lore has it, back when Java was known as "Oak," it was meant as a language to program small appliances such as remote controls, microwaves, televisions, VCRs and other household electronics. In all that time I've never seen Java actually used in such small devices until now.
This book starts out slowly, for people who are just cracking open the box. It gives a complete, in-depth overview of the hardware, as well as the included software -- which the author basically advises you toss away if you have any interest in serious robot programming. Surprisingly (or perhaps not surprisingly) the tiny RCX brick contains as much horsepower as the on-board computers for the Apollo moon missions. The brick contains 32kB of RAM, which seems small at first but when you realize the memory older computers like the Apple II and TRS-80 had, this is an ample amount. Some of those older games had a lot going on in terms of AI and graphics, so for robot applications without graphics it's a lot of memory. In the spirit of Bill Gates, 32kB should be enough for anybody. There are also some good (though prohibitively costly) third-party sensors that, if you owned them all, would give you most of the sensing abilities that old Spock had with his tricorder.
leJOS is a product of Sourceforge, and quite popular. The leJOS language, which is essentially Java with some cut-backs, is covered in depth. It has most of the features of the real Java language, barring object reflection and garbage collection. I haven't heard of any official "smallest JVM" contest but if there was one I'm sure leJOS would be one of the contenders. It definitely surpasses Sun Microsystems J2ME in the micro category. Setup is fairly straight forward and the author even includes a free IDE that works great with the leJOS.
Once past the introductory material, the book contains some truly interesting projects. In a way, the book is similar to the general robotics book Mobile Robots: Inspiration to Implementation (Jones, Seiger, Flynn), except it's for the Mindstorms crowd. There are many robots to build, including a wall-following robot, a robot that navigates with a real compass, a robot you can control from a web page, and some surprisingly in-depth hacking tricks. Unlike books which only give suggestions on how to build robots, this book includes complete building instructions and code listings for every project. The fact that Lego parts and RCX bricks (the processing center of a Lego Mindstorms robot) are identical to each other allows this to be possible. It contains not just 'how to' information, but expands into robot theory as well. Books such as Mobile Robots have to be general and ambiguous at times because the authors don't know what kind of parts a reader will be able to obtain. In a way, this is the genius of Lego Mindstorms - the ability for people to pass robot recipes to one another.
The final two chapters really kick the leJOS language into overdrive. These sections are where geeks thrive. Chapter 11 deals with connecting the RCX brick to the Internet. Apparently the leJOS language has built in classes for sending data, and even a handy Java bean that's useful for embedding JSP web pages. These projects are described down to the last detail, including showing how to set up a free Resin server to serve the web pages. Unfortunately the author does not take the time to explain much of anything with JSP, so beyond his JSP examples you may not get very far. Readers will be forced to look elsewhere if they want to learn more about JSP.
The final chapter really goes hard core. It contains some so-so information about how to hack leJOS, changing classes or removing methods to save memory. The real kicker is a feature of the leJOS JVM I was not aware of: leJOS is capable of running almost ANY language. Apparently even the official JVM is capable of running a multitude of third-party developed languages, including Fortran, C, and weird custom languages such as IBM's NetRexx. All that's required are the development tools to compile the source code into Java bytecode, and these compilers exist in abundance. There are no fewer than 100 such available languages, all free for the downloading.
Illustrations in the book are frequent and helpful, but somewhat plain. Usually they consist of line drawings without much artistic merit. The 3-D renders of the robots are exceptional, however. Each step in building the robots has been rendered, making the Lego parts very easy to see. The steps are well laid out, and the new parts for each step are suspended in the corner and labelled. Thankfully, all models in the book can be built with any version of the Robotics Invention System kit.
If you are a programmer who has an impulse to experiment with robots, but don't want to get solder on your fingers building from scratch, this book will get you to where you want to go. And if you do want to get some solder burns, there's even a few projects in here just for you. Overall the book is a joy to read. The author obviously loves robotics and his enthusiasm shows on every page. The tone is loose but contains a lot of detail presented in an easy-to-digest manner. If you want to dabble in robotics then Lego Mindstorms is the easiest way to do it and having this book is a good way to get started.
You can purchase Core Lego Mindstorms at bn.com. You can read your own book reviews in this space by submitting your reviews after reading the book review guidelines.
- posters that spell Microsoft with a $ or spell it MicroCrap or something.
- posters that glorify a feature that Linux has that BSD or Solaris as had for years, and list this reason as the most important reason to switch over
- posters that say Slackware is better because "you have to compile all of the applications for yourself"
- Rob Malda's arrogance
- frequent spelling and grammar mistakes. I'm not talking something really obscure or a minor technicallity in English, either. I'm talking substituting "loose" for "lose" or "they're"/"their"/"there". Really easily corrected mistakes. Any halfway decent fifth grader could pick up on these errors.
- people that post a mirror to a site that has been Slashdotted, which normally would be nice, but is hosted on a cable modem that is soon Slashdotted
- page widening
- random quashing of posts that don't agree with the Slashdot mindset.
- really annoying sigs
- unhumorous jokes that have to be "explained" to the audience. If your joke has to be explained, it's not funny.
- "BOYCOTT RIAA" and "I can't wait to see Episode II!" all in the same day.
- Rob Malda's childish obsession with legos.
- the Slashdot crew doesn't have any other jobs other than Slashdot, yet it seems it was better run when Rob was running it on a Multia in college in his spare time.
- the "page limit" with the subscription.
- The expulsion of Signal 11.
- ranting, paranoid articles whenever there APPEARS to be a GPL violation, with no verification whatsoever. Just a bunch of ranting posts about freedom.
- for that matter, no verification of articles at all. I wish I could count the number of times Slashdot's been scammed on two hands, but it's been so many.
- April Fool's articles on Slashdot. THESE AREN'T FUNNY. I wasn't going to explain, but whatever. Okay, let's say you run a website. On April Fool's, you post, say, ONE or TWO fake pieces of news along with the real news. This way, some people are fooled. By posting ALL fake news and "jokes", no one falls for the prank.
- no one buys Loki's games, but there is a big mystery when they go out of business.
- no NNTP frontend to Slashdot.
- direct links to bugzilla
- continuing tightening of the "troll filters" to the point where even normal posts are rejected by some stupid criteria
- self righteous posters who want everything under the sun to be Open Source, even though they have never written a line of code in their life
- whenever an article on a new scripting language is posted, all of the C users chime in "but it's not as fast as C". shortly after, all the assembly users chime in "assembly is the fastest". predictably, right after that, someone says "why don't we all just use machine code?"
- anecdotes on your grandmother using Linux to check her email and whatnot. this ALONE proves that Linux is better than Windows for ALL uses.
- cult-like devotion to Linux. reserve your fanaticism for a church, not a kernel.
- someone is not less of a person if they don't use Unix.
- posters who think that BeOS is having "a bad moment" and will surely rise to defeat all other operating systems
- posters who think Palm will open the source to BeOS for no reason at all
- people who think that Amiga isn't dead. The new virtual Amiga doesn't count.
- people who think that OS/2 isn't dead. 'Ecomstation' doesn't count.
- people who bemoan the loss of OS/2 while thinking it was a big conspiracy, completely IGNORING the fact that IBM did not advertise. we all KNOW OS/2 was technically superior to Windows at the time. You don't have to bedazzle us with tales of "running all the latest Windows and DOS applications aside native OS/2 apps". We've heard it all before. We know it WAS better.
- people who think that this is the last year ever we'll ever have to hire C++ programmers, because as we all know, Java is going to "kill it off"
- this is a good one. Completely expositionary articles such as "Surprised by Weath" in which ESR BRAGGED about how rich he was and how he wasn't going to give us any money. NO SIR.
- bitchslapping
- benchmarks that pit, say, Linux (lastest revision) against FreeBSD 3.0 or something old and useless.
- how banner ads for the site only link to other OSDN sites
- any links to nytimes.com
- when someone writes a comment with ^H to signify deletions
- the moderation $rtbl
- meta moderation
- people that spell Red Hat as "RedCrap"
C - A language that combines the speed of assembly with the ease of use of assembly.
...I want a rubbermaid...
I combined my lego and my computer. It may not have moved, but that was the whole point. You see, I had a ZX-81 and a 16k RAM pack with a VERY wobbly connection, and lego just did the trick of keeping it in place!
A few years ago, I made a lego mindstorms robot that would automatically fish for me in everquest. I know there were better ways of doing it, but it was pretty cool. ;)
To kill two birds with one stone, you should just integrate a Mindstorms robot with a vacuum cleaner and a Flowbee attachment. Then you could use it to cut your hair and lawn.
If you haven't opened those tubs in a few years, the outgassing from the ABS will have created lethal quantities of lethal phosgene gas.
Fortunately, I can take those off your hands, and safely dispose of them, just email me for shipping information.
but event driven is good enough for me
Just remember to put your gown over the hook, place your towel over the drain, place your satchel over the panel and put your junk mail on top of the satchel...
Otherwise, you'll never get anywhere with these bots.
=
The Internet is generally stupid
I never do housework *now*, and I don't have robots. You too can do this with a special technique I like to call 'ignore', which works just as well, and is pretty cheap.
Do remember to put on some kind of footwear, though. And bring a shovel.