RCX – pbrick.info https://pbrick.info Random information about all discontinued LEGO pbricks (programmable bricks) Fri, 24 Oct 2014 18:28:49 +0000 en-US hourly 1 https://wordpress.org/?v=4.9.5 MindStorms Ultimate Builders Set 3800 instructions https://pbrick.info/2013/11/mindstorms-ultimate-builders-set-3800-instructions/ https://pbrick.info/2013/11/mindstorms-ultimate-builders-set-3800-instructions/#comments Sun, 03 Nov 2013 20:51:46 +0000 http://pbrick.info/?p=195 A few weeks ago I wanted to build one of the awesome projects of the MindStorms Ultimate Builders Set again, but didn’t want to dig up an old Windows machine or VM to install the original software (the building instructions were all on the CD-ROM, no paper). So I went online to see if anyone had ever made them available like some of the other sets that were CD-ROM only (like Spybotics).  But I couldn’t find them anywhere.

That was a few weeks ago.  I now understand why no one ever did this… I’m still sweating 😉

MindStorms UBS Plotter

Plotter project

Download it here.

I am now building these projects one by one to see if I’ve made any mistakes. The CD-ROM had small movies included in the instruction steps, most of which are probably not that important, but for some of them I may need to find a way of inserting a shot from the movie into the instructions.

 

Version history:
0.2 – verified the plotter project with all its modules: corrected one image in motor module 2 and added two images to the pen module.
0.1 – initial version.

Share

]]>
https://pbrick.info/2013/11/mindstorms-ultimate-builders-set-3800-instructions/feed/ 1
The RCX’s 3 built-in standard programs https://pbrick.info/2013/10/rcx-3-built-in-standard-programs/ https://pbrick.info/2013/10/rcx-3-built-in-standard-programs/#respond Wed, 16 Oct 2013 20:17:08 +0000 http://pbrick.info/?p=144 When your RCX is new (right!) or has been without power for longer than a few minutes, it will have lost its firmware, which you must upload again. In this state the RCX is not completely useless. It still has three basic built-in programs that you can use.

Program 1

When the program is started, Output ports A and C are turned on forward.
So if you attached two motors to these ports and linked them to wheels, you have a rover that drives forward.

Program 2

Sensor ports 1 and 3 are configured for use with touch sensors.
When the program is started, Output ports A and C are turned on forward.
When touch sensor 1 is activated, motor A stops. When touch sensor 3 is activated, motor C stops.
With this you could for example build a rover that turns when hitting an object.

Program 3

Sensor port 2 is configured for a light sensor. Keep two motors attached to output ports A and C.
After activating the program, the motors will turn only when the light sensor is close to a bright surface, for example a white paper. When above a dark surface (for example a black line), the motors will stop.
With this you could build a Rover that drives on a white surface until it reaches a black finish line or boundary.

Share

]]>
https://pbrick.info/2013/10/rcx-3-built-in-standard-programs/feed/ 0
RCX Firmware page https://pbrick.info/2013/10/rcx-firmware-page/ https://pbrick.info/2013/10/rcx-firmware-page/#respond Sat, 12 Oct 2013 20:54:20 +0000 http://pbrick.info/?p=99 Added a page all about RCX firmware today.

Share

]]>
https://pbrick.info/2013/10/rcx-firmware-page/feed/ 0
Controlling a MicroScout from an RCX using VLL https://pbrick.info/2013/10/microscout-rcx-vll/ https://pbrick.info/2013/10/microscout-rcx-vll/#respond Fri, 04 Oct 2013 20:08:02 +0000 http://pbrick.info/?p=45 The MicroScout brick has one motor, a light sensor, display and can make R2D2-like beepy noises. It has 7 built-in programs, and a mysterious “P” mode in which it can be respond to external commands and can even be programmed via the light sensor. LEGO calls this Visible Light Link (VLL), and it has been used in other bricks as well, like the Code Pilot.

So I decided to hook up a standard LEGO 9v Light 2×1 brick to one of the OUT ports on my RCX, and see if I could get it to work. Here is the setup (and my first attempt at Leocad):rcxvll building instructionsThe lamp doesn’t really show up well in the above picture, but it’s simply one of these.

Now basically the light needs to flash in certain patterns to transfer information. For finding out what those patterns are I need to acknowledge Doug Eaton who did a great job of figuring it all out and putting a great write-up online. Another great resource was Barnaby Walter’s page, who achieved the same using the LEGO fibre-optic elements.

I have written a rcxvll.nqh library which contains all the VLL commands the MicroScout recognizes, together with a little test program which runs a sequence of the direct commands which you can use to test connectivity.

To successfully use it all together, make sure to build your setup first, turn on the bricks, upload program to the RCX, set the MicroScout to P mode, then run the RCX program.

You can barely see the light flashing in the video, but it is!

Share

]]>
https://pbrick.info/2013/10/microscout-rcx-vll/feed/ 0
Controlling a Spybotics pbrick using an RCX https://pbrick.info/2013/10/controlling-a-spybotics-pbrick-using-an-rcx/ https://pbrick.info/2013/10/controlling-a-spybotics-pbrick-using-an-rcx/#respond Thu, 03 Oct 2013 17:43:23 +0000 http://pbrick.info/?p=35 The LEGO MindStorms RCX is capable of sending remote control IR signals to a LEGO Spybotics brick. This opens up a ton of new possibilities, essentially giving the RCX access to two more motors (theoretically even six as you can control up to three Spybotics over different channels).

The RCX has been set up real simply with three touch sensors, one for left, one forward and one right. The programming is made pretty easy using NQC:

task main()
{
  /* Set all three Sensor types to Touch sensors */
  SetSensorType(SENSOR_1, SENSOR_TYPE_TOUCH);
  SetSensorType(SENSOR_2, SENSOR_TYPE_TOUCH);
  SetSensorType(SENSOR_3, SENSOR_TYPE_TOUCH);

  /* Set infrared power to High, so we can cover longer distance. */
  SetTxPower(TX_POWER_HI);

  while(true) // Loop forever
  {
    if (SensorValue(0)==1) //button 1 pressed
    {
      SendRCMessage(RC_CHANNEL_1, RC_CMD_REV, RC_CMD_FWD);
    }
    if (SensorValue(1)==1) //button2 pressed
    {
      SendRCMessage(RC_CHANNEL_1, RC_CMD_FWD, RC_CMD_FWD);
    }
    if (SensorValue(2)==1) //button3 pressed
    {
      SendRCMessage(RC_CHANNEL_1, RC_CMD_FWD, RC_CMD_REV);
    }
    Wait(5);
  }
}

This of course assumes your Spybotics brick has been configured to RC channel 1. Download the program: rcx2spy_remote.nqc

Share

]]>
https://pbrick.info/2013/10/controlling-a-spybotics-pbrick-using-an-rcx/feed/ 0
Using an adapter to power the RCX 1.0 https://pbrick.info/2013/10/using-an-adapter-to-power-the-rcx-1-0/ https://pbrick.info/2013/10/using-an-adapter-to-power-the-rcx-1-0/#respond Thu, 03 Oct 2013 07:57:26 +0000 http://pbrick.info/?p=17 The original RCX that came in Robotics Invention System 1.0 and later LEGO Education sets has an adapter socket into which you can plug an adapter to power it, instead of using batteries.

Here it is:
RCX 1.0 power port

If you look closely, you’ll see above the port it says:  9-12 V ~

So that means you can use any adapter that produces between 9 and 12 volts and has a plug that fits? Unfortunately, No.
That ~ symbol at the end means AC, alternating current. Most adapters you’ll find will output DC instead of AC.  The circuitry behind this port is quite good in that it will even appear to work fine on a DC adapter for quite a while, but you run a serious risk of overheating it, and there have been reports of burnt out RCXs!  So make sure you get an adapter with AC output.

Here is a LEGO adapter* I had lying around. How to tell it is the correct one?
LEGO adapter partno 94164

At OUTPUT it says 10V, so that is okay, but there’s a different symbol next to it:
This symbol means Direct Current: DC.  So not good, it’s not AC.
* Adapter merely used as an example, this particular LEGO adapter has the wrong plug anyway, it doesn’t fit the RCX port.

 

Share

]]>
https://pbrick.info/2013/10/using-an-adapter-to-power-the-rcx-1-0/feed/ 0
Configuring the LEGO USB Tower on Linux https://pbrick.info/2013/10/configuring-the-lego-usb-tower-on-linux/ https://pbrick.info/2013/10/configuring-the-lego-usb-tower-on-linux/#comments Wed, 02 Oct 2013 20:20:32 +0000 http://pbrick.info/?p=8 If you are a Linux user and have a Robotics Invention System (RIS) version 1.0 or 1.5, you have a serial infrared (IR) tower, which is fairly easy to set up. RIS version 2.0 came with a USB tower however, and getting that to work isn’t as straightforward. Some of these steps might seem daunting to a novice, but if you follow them correctly you should be OK.

LEGO USB IR Tower

Current versions of the Linux kernel (2.6.*) include support for the LEGO USB Tower by default. There are many Linux distributions, and they’re not all configured the same way. Below instructions were created for Ubuntu version 12.04 TLS 32-bit, one of the most popular distributions at this time.

Step 1 – enable the LEGO USB IR Tower module (¨driver¨)

First make sure the USB IR Tower is connected to your computer. Now open a terminal window to determine if the module actually exists on your system, by running this command:

find /lib/modules -name *lego*

The output will show you one or more file names with long paths in front of them. Just as long as at least one of them ends with legousbtower.ko, you’re OK to continue. If not, this means your distribution doesn’t have this driver available as a module and you may need to actually recompile your kernel. This article does not cover that.

Now we need to make sure the module gets loaded at boot time. Open the file /etc/modules in an editor, for example with the command:

sudo gedit /etc/modules

Add a new line to the end of this file with just the name of the module: legousbtower (without the .ko suffix). My /etc/modules file looks like this.

# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

lp
legousbtower

Save the file and exit the editor. Now reboot the system.
After the reboot, open a terminal window again, and run the command:

ls -l /dev/usb

You should see output similar to this:

total 0
crw------- 1 root root 180, 0 Oct  2 18:39 hiddev0
crw------- 1 root root 180, 1 Oct  2 18:39 legousbtower1

It came up with number 1 for mine, it could have a different number for you, usually legousbtower0. We need to change the permissions on it, run this command:

sudo chmod 666 /dev/usb/legousbtower1
EDIT: the chmod command only changes the permissions temporarily. I found a more permanent solution.

All done! The USB Tower is ready to be used… But now what?

Step 2 – adding USB support to NQC.

The LEGO brick programming language of choice on Linux is NQC (at least with the standard LEGO firmware). It has support for the RCX, Scout and Spybotics pbricks. The latest official release doesn’t have USB support for Linux, but thankfully somebody has already made a patch for this, so we can simply get the source code, patch it and then compile it ourselves. This sounds harder then it is, really. I didn’t run into any errors at all (not even on the first attempt!), which probably says a lot about the quality of the code (kudos to David Baum and John Hansen).

Go back to the terminal and create a directory in which you’ll build NQC. For example, I named mine /develop/nqc.  Make sure this is your current directory and it is empty. Then run the below commands, in that order. They will download and extract the sources and patch:

mkdir nqc-3.1.r6 && cd nqc-3.1.r6
wget http://bricxcc.sourceforge.net/nqc/release/nqc-3.1.r6.tgz
tar xfz nqc-3.1.r6.tgz
cd ..
wget http://sourceforge.net/p/bricxcc/patches/_discuss/thread/00b427dc/b84b/attachment/nqc-01-Linux_usb_and_tcp.diff
ls -l

The output of that last command should look like:

-rw-rw-r-- 1 michiel michiel 13912 Jan  2  2013 nqc-01-Linux_usb_and_tcp.diff
drwxrwxr-x 9 michiel michiel  4096 Oct  2 21:52 nqc-3.1.r6

So now you have a directory containing the source code of NQC, and the patch to enable USB support on Linux. Now apply the patch like this:

patch -p0 < nqc-01-Linux_usb_and_tcp.diff

This should tell you it patched 9 files. Now on to compile NQC!

cd nqc-3.1.r6
make

This will start scrolling a huge list of scary-looking output. Just sit back and relax. When it’s all done, check if the binary files have been produced.
Run “ls -l bin/” as shown below, and the output should look  very similar:

michiel@Ubuntu13:~/develop/nqc/nqc-3.1.r6$ ls -l bin
total 636
-rwxrwxr-x 1 michiel michiel  12812 Oct  2 21:57 mkdata
-rwxrwxr-x 1 michiel michiel 618233 Oct  2 21:58 nqc

Now to install NQC, simply run:

sudo make install

This will install NQC, so afterwards you will be able to run the command “nqc” from any directory.

All done!

To compile and download an nqc program you wrote yourself and send it to the RCX using the USB tower, run:

nqc -Susb:/dev/usb/legousbtower1 -d helloworld.nqc

 

Share

]]>
https://pbrick.info/2013/10/configuring-the-lego-usb-tower-on-linux/feed/ 10