The Lego module provides an interface to the Lego Mindstorms Robot Kit ver 1.1 and 2.0. The module allows you to control the motors, read the sensors and interact with onboard programs using the variable set/get interface. RoboRealm uses the Phantom dll to facilitate communication between the PC and Lego Mindstorm IR Tower. Note that the RCX brick needs to be within transmission proximity of the IR tower for communication to be successful. While this does impose a range limitation on the usage of RoboRealm and the RCX this limitation will soon be reduced due to use of Bluetooth and other wireless technology.

Note that in order to use the Lego control module RoboRealm will need access to the Phantom.dll file that is included in the RoboRealm download. If this module complains about not finding the Phantom.dll please copy that file from your RoboRealm installation folder (normally c:\program files\RoboRealm\) into your system folder (normally c:\windows\system32).




1. Ensure that the checkbox is selected in the upper left corner of the interface. If this checkbox is not selected the motors will not be set. Unchecking this box will allow an onboard program to modify the motor values without disturbance from RoboRealm.
2. Use the moveable bar or the current value edit box to change the value of the motor.
3. To allow RoboRealm to control the motor values you can select an existing RoboRealm variable that contains the value to be send to the RCX motors. Note that the motor value range is from -7 to 7. Note that you can also type in a new RoboRealm variable that you intend to use but have not yet created.


1. To read the sensor values from the RCX select the appropriate variable that should receive the sensor value. These variable can then be used in other RoboRealm modules. You can also type in a new RoboRealm variable that will be used in other modules yet to be added to the processing pipeline.


1. You can test the sound values on the RCX by clicking on one of the sound radio buttons. The sound should play on the RCX and then unselect your selection. To allow RoboRealm to control the sound played select a variable that will contain a number from 0 to 5 which will play the appropriate sound.

Connection Strength

1. If the RCX is moved out of range of the IR tower communication will cease to happen between RoboRealm and the RCX. The connection strength input can be used to determine when this has happened. By selecting a variable to receive the connection strength number (0-99) you can detect when the RCX box goes out of range. 0 indicates no connection, 100 indicates good connection.


1. To communicate with internal RCX programs you can use map RCX variables to RoboRealm variables. To reduce communication overhead you need to specify if the variable should be written to or read from the RCX. To send a variable to RCX use the 'set' radio button. To get a variable from the RCX brick select the 'get' radio button. Note that even though 32 variables are possible in the RCX brick the interface allows access to only the first 8. There is also a scaling by a factor of 10 when moving variables in and out of the RCX. When variables are moved out of the RCX they are multiplied by 10 and when moving back in they are divided by 10. We believe that this is due to how the RIS handles decimal variables.


1. Select the appropriate communication port. Typically for Mindstorms 1.1 you will select one of the COM ports, for Mindstorms 2.0 you will select USB. This relates to the type of connection your PC has to the IR tower that will communicate with the RCX brick.
2. Select the tower connect type.


1. Specify the variable that should accept the battery value from the RCX. You can use this value to detect when the RCX battery is getting low.


1. If you want to quickly stop the motors press the 'stop' button. This will deactivate the RCX motors until the 'start' button is pressed.


You will need to download the Phantom DLL (no longer available!) in order for RoboRealm to be able to communicate with the Lego RCX control.

See Also


For more information

Lego Mindstorms
Max Planck Institute

 New Post 

Lego Related Forum PostsLast postPostsViews
lego rcx 1.0 ir tower
i have the lego mindstorm rcx 1.0 but i cant program it because i have the lego mindstorm 2.0 ir tower is there any way i can i ...
4 years 2 1411
Lego RCX control interface
I am new to roborealm, and am trying out interfacing with some of my robot platforms. I have been generally sucessful except for...
7 years 5 2264
RCX brick
I have just purchased several robotics invention systems, which are RCX 1.0 which I have just found out is about 10 years old.&n...
8 years 2 2257