Linux NQC for the Lego Spybotics Brick

When Frys was dumping Lego Spybotics hardware a while back for $29, quite a few DRPG people grabbed one or two of them. So we have a whole pile lying around and nobody knows quite what to do with them. The Spybotics brick is a bit more limited than the original RCX brick and, to make matters worse, they come with a Windows-only “visual” programming environment. I’ve been setting up programming environments on a Linux box at the DPRG Lab for various microcontrollers and wanted to figure out something useful we could do with all our Spybotics bricks.

I had wired my brick up to one of the Linux boxes and started experimenting when Ed Paradis noticed it and we got to talking. It turns out he’s been doing some work on robot swarm behaviour using Spybotics robots. He suggested we try Not Quite C. NQC compiles C-like source to the Lego bytecode format used by the RCX and Spybotics bricks. This is cool because you can write code in a familiar language. Ed gave me a copy of v2.5 and I started playing with it. There is also a newer version 3.0 but it’s still beta and didn’t compile on Linux or OS X. After a little hacking on the makefile and code, I got 3.0 to compile just fine. (patch submitted to the maintainers of course!)

Like most converted toys, the Spybotics units are not exactly ideal for real robotics use. They lack any sort of sensors that would allow odometery and, after a couple of weeks of trying, we could find no way to make them go in a straight line or do any sort of remotely accurate dead reckoning. On the other hand, a minor hardware hack turned the optical serial link used for programming into a tolerable line-following sensor. And the robot-to-robot IR communication makes them a cheap way of playing with swarm behaviours.

I’m told this month’s issue of Circuit Cellar includes an article on hacking the I2C bus on the Spybotic’s motherboard to allow more sensors. If it’s not too much work, this could make them a lot more useful.

Robots and Robotron

I’m finally within sight of being mostly caught up on a lot of the work around here. Susan and I managed to find time to make two DSO performances in January. I might even have enough free time to keep my weblog up to date or work on a few non-work-related projects during February.

Work on the DPRG‘s non-profit status continues. We received our certificate of incorporation from the State of Texas this month. The next step is filing the 501(c)3 application with the IRS. The Tuesday night RBNO meetings at the DPRG World Headquarters (aka the “warehouse”) continue to grow in popularity. We now have two live webcams and an IRC channel during the RBNO.

I had to squeeze in a little time during January to open up the Robotron: 2084 cabinet and tune up the joysticks. A fellow VAPS member has challenged me to a game. This is the first time in 15 years or so I’ll be playing against another expert level player. In the 80’s I don’t think anyone could beat me – but I’m a bit rusty these days, so it’ll be interesting to see what happens.

I’m thinking about updating the Robotron logic board to the slightly newer blue ROMs from the yellow/orange ROMs I currently use. At one time this would have been a simple matter of going to any of dozens of Internet ftp or web sites that offered the ROM images for download and then burning a new set of EPROMs. But it appears there has been some sort of crack-down on arcade game ROM images online. Several fellow collectors emailed me the ROM images but it’s sad that this has gotten so much harder than it used to be.

Stuff That Happened in April

It’s been a busy month but I can’t let the month get away without posting at least one news update! A lot of my time lately has been sucked up helping a variety of local groups with computer issues.

Susan completed an update of the website for the Frisco Association for the Arts. It looks a bit more artsy than the old, interim site. We’re just starting some work on the Arts of Collin County site but it’s got a ways to go before it’s ready for prime time.

I also helped set up my first foal cam recently. Barry Jordan has a couple of horses out at his ranch and wanted a webcam so everyone could watch the birth of a foal that was due this month. He’s limited to a dial-up link and MS Windows so it presented a number of challenges. Barry and Eric Yundt (both fellow DPRG members) had been working on it for a while and they actually did 99% of the work but I got drafted to help out and provided a windows binary of wget that solved the last remaining roadblock to getting the image from the webcam to the windows box and then up to the server. The dial-up link limits the refresh rate of the image but it’s still kinda cool.

Speaking of DPRG stuff, I’ve been spending a good bit of time helping get the new DPRG computer lab up to speed. Using a couple of Linksys routers I picked up on eBay, we’ve now got high-speed Internet access. I’ve got a Red Hat 7.3 box set up to act as the LAN server and it’s also going to host development environments for several of the microcontrollers commonly used in the group. So far, I’ve built GCC cross-compilers for the Atmel AVR and Motorola 68k chips. I’ve also installed Pete Gray’s Linux port of Small-C for New Micros’ IsoPod (these are really cool little boards). More to come as I get time.

I upgraded my workstation at the office to Red Hat 9 a couple of weeks ago and was pleased with the results. It really should have been called 8.1 as it seems very much like 8.0 but without a lot of the bugs. The GUI looks great; anti-aliased fonts, professional looking icons, I can run the occasional KDE program without it looking all goofy like it did on previous versions of Gnome. Overall it looks way better than Windows XP but not as good as OS X (yet).

After a week or so of playing with 9 on my workstation, I got brave enough to upgrade one of our servers this week. The biggest problem I ran into on the server was that wu-ftpd is gone and there was no explanation of why or what replaced it. There was just no ftp service, no wu-ftp entry in the xinetd directory, and RPM -q indicated wu-ftpd wasn’t installed. I eventually found that vsftpd replaced it but isn’t running by default. My initial impression is that vsftpd is a piece of junk. The first problem is that it has some sort of problem running under xinetd so you have to run it as daemon. Once I got it running, I started getting complaints that it was corrupting files. A little investigation revealed that vsftpd pretends to support ASCII transfer mode but really ignores ASCII mode requests and just sends everything in binary mode resulting in corrupted text files. After a bit of poking around, I found a setting in the config file that turns off this bizarre behaviour. I suppose it was the frequent security issues with wu-ftpd that prompted Red Hat to make the switch but I’d much prefer they’d picked something else to switch to (and it would have been nice if they could mention this sort of drastic change in the documentation somewhere).

First Post: 2003

Well, I suppose it’s a bit late to be posting new year’s resolutions so I’ll just skip straight on to other things. I’ve picked up a couple of new ODP categories to play with. ODP still hasn’t gotten the RDF export fixed. They seem to be having some major scaling issues right now. Wish they’d accept some help from the many editors who’ve offered but they seem determined not to.

The DPRG had to find a new meeting place this year. For several years we’ve been meeting at the Bill Priest Institute. Starting this month we’ve been offered meeting space at The Science Place, where we usually hold the Roborama and other competitions. So expect to see more robots and hackers wandering around The Science Place this year.

News from a Slow Month

Not much news to post lately. I’m just staying too busy with work I guess. A lot of my spare time is still getting sucked up doing work on the DPRG website. I’ve been writing a pile of Perl code to automate a lot of the administration functions of the site. I’ve made some progress on my MCORE project. I’ve successfully built a GCC Linux to MCORE cross compiler thanks to a handy bash script by Brian LaPonsey of Motorola. (the scripts recommended in the CrossGCC FAQ are so out of date, they no longer work with any current version of the tool chain). I should have time to put together a little test code for the New Micros MCORE board soon.

Meanwhile, I’ve managed to become an ODP editor. I was trying to get NCC listed under one of the website design categories and not having much luck because there was no editor for the category. So I volunteered and now get to blow a little more of my time maintaining the prestigous Computers: Internet: Web Design and Development: Designers: Full Service: N category on DMOZ.

DPRG Website gets a New Look

I’ve been busy the last couple of weeks helping with a major renovation of the DPRG website. Susan created some new graphics and we came up with a nice, simple layout. We’re using 100% XHTML 1.0 and CSS for the new site. So far it works great in both Mozilla and IE. Opera is a bit flaky when it comes to rendering W3C standard CSS but it’s maybe 90% there. The hard part is just the sheer number of pages and images. There is around 150MB of content on the site and it’s still very much a work in progress.

All the work on the DPRG website has sucked me back into the hardware side of robotics. I’ve got two new toys to play with. I went by New Micros, Inc. last week and picked up an IsoPod development kit and an MCORE board. The IsoPod is an based on a Motorola DSP5680x DSP that provides 40MIPS of processing power
and a ton of I/O on a tiny little board. To fully utilize it requires the use of IsoMax, a new FSM-based realtime programming language that New Micros developed. Since I’m a diehard C programmer, I also picked up the MCORE. With a 16bit Motorola MMC2107 M*CORE processer
running at 33MHz, it’s not nearly as powerful as the IsoPod but gives me the advantage of working in a familiar language. Well, I should say it will give
me that advantage once I prod GCC into compiling code for it. New Micros only provides Forth for the MCORE. But GCC 3.2 supports MCORE as a target, so
I’m trying to get a Linux-to-MCORE cross-compiler working. Should be interesting. Motorol created a Windows-to-MCORE cross compiler using a much older version of GCC, so I know it should be possible. And both New Micros and Motorola have offered technical assistance. I’ll provide more details on it as I progress.

Susan has a new claim to fame. She has for a while maintained what is probably the best online discography of Robert Shaw’s work to be found. As it turns out, the Atlanta Symphony Orchestra Chorus seems to agree. Their discography Link now points to Susan’s page. I think this means she now maintains the official Robert Shaw Discography.