Lego RCX with Linux and PowerFunction

I have had one of the original Lego mindstorm sets since they first came out. The idea of building a lego robot with my own programming really sturck a chord with me. I built some basic robots, but for one reason or another, never really did much more with the set. So for years the set gathered dust, and occationally got loaded on a moving truck.

So now (2015), wanted to see if I could put my old RCX kit to good use. First couldn't find the IR tower, so had to buy a USB version from ebay. For programming, I don't have the orginial disk or a Windows 95 machine, but I have plenty of Linux macines, so decided to use NQC (Not Quite C). Some resources that helped setup the IR tower and NQC in Linux:
      Configuring the LEGO USB Tower on Linux
      Using NQC on a Raspberry Pi to Program a Lego Mindstorms RCX Brick

Got the firmware loaded, and wrote a simple NQC program, but found one of the motors was siezed. Wasn't too thrilled to buying some sketchy used motor off ebay, so looked for an alternative. Found that with a simple cable (8886 LEGO Power Functions Extension Wire) the new power function motors could be used with the RCX brick.

Sample command to load the firmware:
/usr/src/nqc-3.1.r6/bin/nqc -Susb:/dev/usb/legousbtower0 -firmware firm0332.lgo

Sample command to load a .nqc program:
/usr/src/nqc-3.1.r6/bin/nqc -Susb:/dev/usb/legousbtower0 -d sumo_rcx_3.2.nqc

Running the orginal motor and the power function
motor side by side.

RCX tank with two bump sensors, and powered
by a single Power functions M-Motor.

Later, swapped the single M-Motor for 2 L-Motors.
So now it can turn.

Tank with a simple program to test turning.

Added a light sensor to see how the tank could follow the line.

Back to Main Page