15
Using the LEGO Mindstorms RCX in 2017 John Holbrook | [email protected] | http://johnholbrook.us May 2017 Contents 1 Introduction 2 2 Why use an RCX? 2 3 Hardware Guide 3 3.1 RCX Brick .............................. 3 3.2 Infrared Tower ............................ 3 3.2.1 USB Infrared Tower on 64-bit Windows .......... 4 3.3 Motors ................................. 4 3.4 Sensors ................................ 5 3.5 Wires ................................. 6 3.6 Remote ................................ 7 4 Buying an RCX 7 4.1 Buying a Set ............................. 7 4.2 Buying Individual Parts ....................... 8 5 Programming an RCX 9 5.1 Windows ............................... 9 5.2 Linux ................................. 10 5.3 Mac .................................. 11 6 Resources 12 6.1 Hardware/Building Guides ..................... 12 6.2 Software/Hacking ........................... 12 6.3 Sharing ................................ 12 6.4 General/Miscellaneous ........................ 13 6.5 Books ................................. 13 7 Frequently Asked Questions 13 1

Using the LEGO Mindstorms RCX in 2017 - John … · Using the LEGO Mindstorms RCX in 2017 John Holbrook | [email protected] | May 2017 Contents 1 Introduction 2 2 WhyuseanRCX?

Embed Size (px)

Citation preview

Page 1: Using the LEGO Mindstorms RCX in 2017 - John … · Using the LEGO Mindstorms RCX in 2017 John Holbrook | lego@johnholbrook.us | May 2017 Contents 1 Introduction 2 2 WhyuseanRCX?

Using the LEGO Mindstorms RCX in 2017

John Holbrook | [email protected] | http://johnholbrook.us

May 2017

Contents1 Introduction 2

2 Why use an RCX? 2

3 Hardware Guide 33.1 RCX Brick . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33.2 Infrared Tower . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

3.2.1 USB Infrared Tower on 64-bit Windows . . . . . . . . . . 43.3 Motors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43.4 Sensors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53.5 Wires . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63.6 Remote . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

4 Buying an RCX 74.1 Buying a Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74.2 Buying Individual Parts . . . . . . . . . . . . . . . . . . . . . . . 8

5 Programming an RCX 95.1 Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95.2 Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105.3 Mac . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

6 Resources 126.1 Hardware/Building Guides . . . . . . . . . . . . . . . . . . . . . 126.2 Software/Hacking . . . . . . . . . . . . . . . . . . . . . . . . . . . 126.3 Sharing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126.4 General/Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . 136.5 Books . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

7 Frequently Asked Questions 13

1

Page 2: Using the LEGO Mindstorms RCX in 2017 - John … · Using the LEGO Mindstorms RCX in 2017 John Holbrook | lego@johnholbrook.us | May 2017 Contents 1 Introduction 2 2 WhyuseanRCX?

1 IntroductionDespite being the oldest of the three Mindstorms programmable bricks, the RCXremains my favorite. I love its simplicity, small size, and its relative reliance ontraditional LEGO R© studs, rather than Technic beams. However, using an RCXis in some ways harder and more complicated than when it was first released in1998. This article will attempt to summarize some of the equipment, software,and techniques necessary to use an RCX in 2017.

2 Why use an RCX?There are several reasons you might want to use an RCX instead of an NXT orEV3:

1. You already have one. Maybe you’re a teacher, and your school neverbought newer Mindstorms sets. Maybe you found your old RCX equip-ment in the attic, and want to play with it again. Maybe you’re like me,and you never stopped playing with it in the first place.

2. They’re cheap. If you have a limited budget to spend on Mindstormsparts, or you want to buy a kit for a child, but you aren’t sure if they’lluse it enough to justify the cost of a more-expensive NXT or EV3 set, theRCX could be a good choice.

3. They’re simple. For small, uncomplicated, or permenant projects, the lowcost and relative simplicity of the RCX make it a good choice.

4. You have a thing for retro technology. Admit it: There’s something ap-pealing about the 7-segment LCD display, the infrared communication,and the 8-bit SOC.

2

Page 3: Using the LEGO Mindstorms RCX in 2017 - John … · Using the LEGO Mindstorms RCX in 2017 John Holbrook | lego@johnholbrook.us | May 2017 Contents 1 Introduction 2 2 WhyuseanRCX?

3 Hardware Guide

3.1 RCX BrickThe RCX brick comes in 3 hardware revisions:

• 1.0 - The original. The only revision to include a power input jack, sothat in addition to 6 AA batteries, it can also be powered by a 9-12V ACpower supply. (Yes, you read that right: It’s an AC input).

• 1.5 (also called 1.1) - Included with the Robotics Invention System (RIS)1.5 set. Identical to the 1.0 brick except that the power input jack hasbeen removed. Officially, the 1.5 brick is also called an 1.0 brick, but witha serial number greater than approximately 300000 1.

• 2.0 - Identical to the 1.5 brick except that the IR interface operates at twicethe frequency2 (76 kHz instead of 38 kHz). This has the effect of slightlyreduced range, but enables the 2.0 brick to talk to Spybotics products 3.

Aside from those differences, all hardware revisions are functionally identical,and all firmware versions are compatible with all hardware revisions. I tend tofavor the 1.0 brick due to the inclusion of the power input, and in any case the1.0 seems to be the most commonly-available brick online.

Figure 1: RCX 1.0 brick, from all sides. The 1.5 brick is identical except thatthere’s no power jack at the bottom. The 2.0 brick is identical except thatthere’s no power jack at the bottom and it says "RCX 2.0" instead of "RCX1.0".

3.2 Infrared TowerThe infrared tower is used to send programs from a computer to the RCX, anddata from the RCX back to the computer for logging. There are two models

1https://bricks.stackexchange.com/questions/11052https://bricks.stackexchange.com/questions/80493More info about Spybotics products at https://en.wikipedia.org/wiki/Lego_Spybotics

3

Page 4: Using the LEGO Mindstorms RCX in 2017 - John … · Using the LEGO Mindstorms RCX in 2017 John Holbrook | lego@johnholbrook.us | May 2017 Contents 1 Introduction 2 2 WhyuseanRCX?

of infrared tower. One connects via a DE-9 4 serial port and requires a 9-voltbattery, while the other connects over USB, and can get enough power fromthat so as to not require a battery. The USB model is more convenient to use(due to the lack of additional battery), and seems to be more readily availableonline.

Figure 2: Two IR towers: USB on the left; Serial on the right. Photo: Brick-ipedia

3.2.1 USB Infrared Tower on 64-bit Windows

For many years, the common wisdom was that the USB infrared tower was notsupported on 64-bit versions of windows, the reason being that LEGO neverwrote a 64-bit driver for the USB tower. Recently, however, a 64-bit compat-ible USB tower driver 5 has become available, courtesy of the people at Lego-Engineering.com, a joint project of Tufts University’s Center for EngineeringEducation and Outreach, LEGO Education, and various other educators. Notethat this driver is only compatible with ROBOLAB software (more info on RCXlanguages below); thus, the USB IR tower can only be used with ROBOLAB on64-bit versions of Windows. The serial IR tower can be used on 64-bit versionsof windows in conjunction with a USB-to-DE-9 adapter.

3.3 MotorsRCX-compatible motors come in 2 shapes, which I’ll call "rectangular" and "cu-bic". The cubic motors appear in more sets, and are in my opinion easier to workwith.Cubic motors come in 2 hardware revisions. However, unlike the RCX brick,there are no visual cues on the outside of the motors to tell the hardware re-visions apart. The primary difference between the 2 revisions is that the older

4Often incorrectly called a "DB-9" port; more info at http://www.nullmodem.com/DB-9.htm

5http://www.legoengineering.com/rcx-usb-tower-support/

4

Page 5: Using the LEGO Mindstorms RCX in 2017 - John … · Using the LEGO Mindstorms RCX in 2017 John Holbrook | lego@johnholbrook.us | May 2017 Contents 1 Introduction 2 2 WhyuseanRCX?

Figure 3: Motors. Left: rectangular motor (2838c01). Right: cubic motor(71427c01 /43362c01).

motors use internal gears made of metal, whereas in the newer motors the inter-nal gears are made of plastic. As a result, the older hardware revision is moredurable. It’s also heavier, which is the best way to tell the difference betweenthe two hardware revisions. You’ll see the older revision described on Bricklinkas "Older, heavier weight" and the newer revision described as "Newer, lighterweight".

3.4 SensorsThe first-party sensors available for the RCX are Light, Rotation, Touch, andTemperature. In addition, a number of third-party sensors are available, andLEGO R© also produced a "DCP Sensor Adapter" which converted the RCXconnector to a 7-Pin DIN socket compatible with LogIT Microsense scientificsensors made by DCP Microdevelopments 6.

6More info on using such sensors with the RCX athttp://ccgi.dcpmicro.plus.com/DCPMICRO/lego.htm

5

Page 6: Using the LEGO Mindstorms RCX in 2017 - John … · Using the LEGO Mindstorms RCX in 2017 John Holbrook | lego@johnholbrook.us | May 2017 Contents 1 Introduction 2 2 WhyuseanRCX?

Figure 4: First-Party sensors. Clockwise from back left: Light sensor, rotationsensor, temperature sensor, touch sensor

3.5 WiresThe wires used for connecting motors and sensors to the RCX brick are termi-nated at either end with a 2x2x2/3 brick with electrical contacts on the top andbottom. Wires are available in lengths of 15, 17, 20, 21, 26, 36, 46, 69, 162, and378 studs (1 stud = 8 mm = 0.315 in) 7. Every first-party sensor except for thetouch sensor comes with a short wire permenantly affixed to the sensor.

7Computed using the excellent LEGO unit converter available at http://studs.sariel.pl/

6

Page 7: Using the LEGO Mindstorms RCX in 2017 - John … · Using the LEGO Mindstorms RCX in 2017 John Holbrook | lego@johnholbrook.us | May 2017 Contents 1 Introduction 2 2 WhyuseanRCX?

Figure 5: Wire connector for RCX motors and sensors, seen from the top (atleft) and bottom (at right)

3.6 Remote

Figure 6: RCX remote.Photo: Brickipedia

There also exists an infrared remote control (part num-ber 9738), which can control the motor outputs of theRCX brick in real time without the need for program-ming.

4 Buying an RCX

4.1 Buying a SetIf you’re new to Mindstorms, you’ll probablywant to buy a set containing a bunch of parts.eBay (https://www.ebay.com/) and Bricklink(https://www.bricklink.com/) are both good places tobuy RCX sets online.

The following sets contain RCX bricks:

7

Page 8: Using the LEGO Mindstorms RCX in 2017 - John … · Using the LEGO Mindstorms RCX in 2017 John Holbrook | lego@johnholbrook.us | May 2017 Contents 1 Introduction 2 2 WhyuseanRCX?

Set # Set Name RCXBrickVersion

MotorsIncluded

SensorsIncluded

IR TowerIncluded

9790 ROBOLABTeamChallengeSet

1.0 2 old cubic 2 touch, 1light

Serial

9719 RoboticsInventionSystem 1.0

1.0 2 old cubic 2 touch, 1light

Serial

9785 ROBOTechnologySet (Serial)

2.0 2 old cubic 2 touch, 1light

Serial

9786 ROBOTechnologySet (USB)

2.0 2 old cubic 2 touch, 1light

USB

9793 ROBOLABTeamChallengeSet (Serial)

2.0 2 rectangu-lar

2 touch, 1light

Serial

9794 ROBOLABTeamChallengeSet (USB)

2.0 2 rectangu-lar

2 touch, 1light

USB

3804 RoboticsInventionSystem 2.0

2.0 2 old cubic 2 touch, 1light

USB

Table 1: Sets containing RCX bricks.

The ideal set would be one that contains an RCX 1.0 brick, older cubicmotors, and a USB IR tower. As you can see, such a set doesn’t exist. So,you’ll have to decide which of those features you care about most and whichyou could do without. Alternatively, you could purchase either set 9790 or 9719and supplement that with a USB IR tower, which can be indiviually purchasedfor relatively little online.

4.2 Buying Individual PartsIf you already have a bunch of LEGO R© elements, you can save some money bybuying only the electronic components you want. In my experience, Bricklink(https://www.bricklink.com/) is the best place to buy individual Mindstormscomponents (or individual LEGO R© components of any kind). Here are partnumbers for I’ve mentioned:

8

Page 9: Using the LEGO Mindstorms RCX in 2017 - John … · Using the LEGO Mindstorms RCX in 2017 John Holbrook | lego@johnholbrook.us | May 2017 Contents 1 Introduction 2 2 WhyuseanRCX?

Part Name Part #RCX 1.0 brick 884aRCX 1.5 brick 884bRCX 2.0 brick 884cIR Tower (USB) x431c01IR Tower (Serial) 9713Rectangular motor 2838c01Cubic motor, old 71427c01Cubic motor, new 43362c01

Light sensor 9758Rotation sensor 9756

Temperature sensor 9755Touch sensor 9757

DCP Sensor Adapter 9917Wire Various; most begin with 5306bc or 5306ac

Remote control 9738

Table 2: Part numbers for RCX-era electronic components.

5 Programming an RCX

5.1 WindowsIn my experience, programming an RCX brick is most easily done from a com-puter running Windows. Several languages are available. On 64-bit versions ofWindows, the USB IR tower can only be used by ROBOLAB; see section 3.2.1above for more info.

ROBOLAB is the best of a couple of pieces of software officially distributedby LEGO for programming RCX bricks. It’s based on National InstrumentsLabView, and unlike later LabView-based Mindstorms software (NXT-G andEV3-G), the visual resemblence is striking. The latest version of ROBOLAB is2.9.4c, though version 2.5.4 is similar; the primary difference is that 2.9.4c canalso program NXT bricks. Unfortunately, it can be pretty difficult to get aholdof a copy of ROBOLAB these days if you don’t already have one; relatively fewcopies are available on Bricklink, and can go for upwards of $50. Note that afterinstalling v2.9.4 from a CD, you’ll want to also install the 2.9.4c patch, whichcan be found at LegoEngineering.com 8.

These days, I do most of my RCX programming in ROBOTC. As thename implies, ROBOTC is a C-based language designed for robotics; versionsof ROBOTC are also available for NXT/EV3 programmable bricks, VEX IQ"robot brain", VEX Cortex/Pic microcontrollers, and Arduino. Support forthe RCX is not included with current versions of ROBOTC; however, a legacyRCX version 9 is available, and this has the added advantage of being free,

8http://www.legoengineering.com/robolab-2-9-4c-patch/9http://robotc.net/download/rcx/

9

Page 10: Using the LEGO Mindstorms RCX in 2017 - John … · Using the LEGO Mindstorms RCX in 2017 John Holbrook | lego@johnholbrook.us | May 2017 Contents 1 Introduction 2 2 WhyuseanRCX?

whereas other versions of ROBOTC are not. ROBOTC also comes packagedwith a pretty good Integrated Development Environment, and lots of help andresources are available to learn how to use it, because of the support for manypopular educational robotics platforms.

Another C-based language for the RCX is NQC 10 ("Not Quite C"). One ofthe oldest third-party languages for the RCX, NQC has the advantage of workingon all three popular desktop operating systems, and developer Dave Baum haswritten several books about the RCX system, which include information aboutNQC and its use. Another advantage of NQC is that it uses the stock firmwareon the RCX (i.e., the same as used by ROBOLAB), unlike ROBOTC or LeJOS.

For people who prefer programming in Java, there’s LeJOS 11. Short for"LEGO Java Operating System", versions of LeJOS are also available for thenewer NXT and EV3 bricks, and LeJOS has proven to be one of the mostpopualr languages for third-party RCX programming.

Several other languages exist for the RCX, with which I am less familiar orwhich are hard to find nowadays. These include:

• pbForth 12 - an implementation of Forth 13 for the RCX. Deveoped byRalph Hempel, who later worked on pbLua for the NXT and ev3dev forthe EV3.

• brickOS 14 - allows you to program your RCX in C or C++. Never usedit before. Latest release dates back to 2004, and I’m not sure if anybodystill actively uses it.

Bricxcc 15 is a popular Mindstorms IDE for Windows which supports program-ming the RCX using NQC, LeJOS, brickOS, and other languages.

5.2 LinuxAs far as I’m aware, there are no GUI Linux applications for controlling theRCX. However, if you’re comfortable with the command line (and if you’re alinux user, you probably are), there are several choices. These include:

• NQC 16 - the most popular choice on Linux. A cross-platform C-likelanguage for the RCX. Also includes various command-line tools, includingthe ability to send arbitraty files and opcodes to the RCX, which can beuseful for programming in some other languages and for general hackingpurposes.

10http://bricxcc.sourceforge.net/nqc/11http://www.lejos.org/rcx.php12http://www.brickwiki.info/wiki/PbFORTH13More info about the Forth programming language at

https://en.wikipedia.org/wiki/Forth_(programming_language)14http://brickos.sourceforge.net/15http://bricxcc.sourceforge.net/16http://bricxcc.sourceforge.net/nqc/

10

Page 11: Using the LEGO Mindstorms RCX in 2017 - John … · Using the LEGO Mindstorms RCX in 2017 John Holbrook | lego@johnholbrook.us | May 2017 Contents 1 Introduction 2 2 WhyuseanRCX?

• LeJOS 17 - Java virtual machine for the RCX. Versions also available forthe NXT and EV3.

• pbForth 18 - an implementation of Forth for the RCX. Deveoped byRalph Hempel, who later worked on pbLua for the NXT and ev3dev forthe EV3. An advantage of pbForth is that it compiles programs on theRCX brick itself rather than on the computer you’re using, so all that’sreally required is the ability to transfer plaintext files from to and fromthe RCX, which can easily be accomplished on Linux with NQC.

It’s worth noting that drivers for the USB IR tower are included with essentiallyall versions of the Linux kernel released in the last 10 years or so.

5.3 MacIf you have a modern Mac, the easiest thing to do is to program your RCX in aWindows virtual machine (using a piece of software like VirtualBox, VMWareFusion, or Parallels). I’ve run various versions of ROBOLAB and ROBOTC ina virtual machine on various Macs, with no apparent loss of functionality.

Mac software for programming RCX bricks does exist, but is generally eitherclassic Mac OS software or OS X software compiled for PowerPC, meaning thatit won’t run on modern Macs. However, if you have an older Mac running MacOS 9 or an older version of OS X (10.5 or older for running PowerPC software,10.4 or older for running classic Mac OS software), it is often still possible toprogram an RCX natively on a Mac.

LEGO released versions of ROBOLAB for the Mac, and versions 2.5.4and 2.9.4 are available as native OS X software compiled for PowerPC. As faras I’m aware, the functionality of Mac versions of ROBOLAB is identical tothe corresponding version on Windows, though I’ve never used v2.9.4 for mac.ROBOLAB for Mac is even harder to find online than ROBOLAB for Windows,although it appears that later versions of the software were distributed on asingle disc containing both Windows and Mac versions of the software.

NQC19, LeJOS20, and brickOS21 all have varying degrees of compatibilitywith OS X. Sometimes, compiled versions of the software are available for theMac; other times, it’s necessary to compile the software yourself. I’m not awareof any Mac IDEs for any of those languages; the NQC website links to a MacNQC IDE called MacNQC but the link is dead at the time of writing.

Since pbForth22 compiles and runs code on the RCX itself, all that’s nec-essary to use it on a mac is the ability to send plaintext files from the mac tothe RCX, which can be accomplished with NQC.

17http://www.lejos.org/rcx.php18http://www.brickwiki.info/wiki/PbFORTH19http://bricxcc.sourceforge.net/nqc/20http://www.lejos.org/rcx.php21http://brickos.sourceforge.net/22http://www.brickwiki.info/wiki/PbFORTH

11

Page 12: Using the LEGO Mindstorms RCX in 2017 - John … · Using the LEGO Mindstorms RCX in 2017 John Holbrook | lego@johnholbrook.us | May 2017 Contents 1 Introduction 2 2 WhyuseanRCX?

6 ResourcesIf you know of any other resources that should be added to this list, feel free tolet me know by dropping me an email at [email protected].

6.1 Hardware/Building Guides• Linda Hamilton’s Lesson Plans (http://www.marshall.edu/LEGO/plans.html)

- many project ideas suitable for home or classroom use, most of whichuse the RCX or can be built with parts from RCX kits.

6.2 Software/Hacking• RCX Firmware (https://pbrick.info/rcx-firmware/) - info about RCX

firmware, as well as downloads of various First- and Third- party firmwareimages.

• Linux NQC Programming (https://minordiscoveries.wordpress.com/2014/01/20/using-nqc-on-a-raspberry-pi-to-program-a-lego-mindstorms-rcx-brick/) - a detailedwrite-up covering programming an RCX brick using NQC on Linux. Writ-ten for use with a Raspberry Pi, but applicable to Linux systems in general.

• RCX Internals (http://www.mralligator.com/rcx/) - information aboutthe internal workings of the RCX and Serial IR tower, including hardwareteardown, discussion of IR communications protocol, and complete opcodereference.

• RCX 2.5 SDK (http://www.philohome.com/sdk25/sdk25.htm) - archivesof various tools and documentation for use with the RCX, Spybotics, andScout bricks which are no longer posted on LEGO’s website.

6.3 Sharing• LDraw (http://ldraw.org/) - an open standard for LEGO CAD programs.

Various editors are available for many platforms. Unlike LDD (the officialLEGO CAD program, which incidentally can output to LDraw format),LDraw’s parts library is much larger, and includes RCX components.

• r/mindstorms (http://mindstorms.reddit.com/) - Good place to ask ques-tions about the RCX and other Mindstorms products, as well as to seethings other people have done.

• LEGO Stack Exchange (https://bricks.stackexchange.com/) - Not RCX-specific (or even Mindstorms-specific), but still a good place to ask ques-tions about the RCX.

12

Page 13: Using the LEGO Mindstorms RCX in 2017 - John … · Using the LEGO Mindstorms RCX in 2017 John Holbrook | lego@johnholbrook.us | May 2017 Contents 1 Introduction 2 2 WhyuseanRCX?

6.4 General/Miscellaneous• pbrick.info (https://pbrick.info/) - Lots of great info about various dis-

continued Mindstorms bricks, including the RCX.

• Bricklink (http://www.bricklink.com) - The best place to identify parts,find the contents of sets, and buy individual parts.

• LEGO Engineering (http://www.legoengineering.com/) - Resources andinfo about various Mindstorms platforms, including the RCX. In particu-lar, info about ROBOLAB patches and 64-bit Windows USB tower drivers.

6.5 BooksI haven’t read these books, and they were published near the time of release ofthe RCX, so some of the information may now be obsolete or irrelevant.

• Definitive Guide to LEGO MINDSTORMS, Second Edition byDave Baum (ISBN 1590590635)

• Building Robots With Lego Mindstorms: The Ultimate Toolfor Mindstorms Maniacs by Mario Ferrari, Guilo Ferrari, and RalphHempel (ISBN 1928994679)

• The Unofficial Guide to LEGOMINDSTORMS Robots by JonathanKnudsen (ISBN 1565926927)

7 Frequently Asked QuestionsThese questions are mostly compiled from searches of Quora, the Mindstormssubreddit, and the LEGO Stack Exchange.

I changed the batteries in my RCX and now all my pro-grams are missing! What happened?The RCX’s programs and firmware are stored in RAM. This made the brickcheaper to manufacture, because RAM was much cheaper than flash storage inthe 1990s. However, a downside of RAM is that it needs to be continuouslypowered to retain the data it’s storing. Thus, when power is cut to the RCX,such as when batteries are removed, its memory is erased, and it reverts to thedefault firmware and programs.

Happily, inside the RCX there is a small capacitor, which maintains power tothe RAM for approximately 20 seconds after the batteries are removed. Thus, ifyou change the batteries within that time, the brick’s memory will be preserved.Changing the RCX’s batteries within 20 seconds sounds difficult, but is actuallynot too hard with some practice.

13

Page 14: Using the LEGO Mindstorms RCX in 2017 - John … · Using the LEGO Mindstorms RCX in 2017 John Holbrook | lego@johnholbrook.us | May 2017 Contents 1 Introduction 2 2 WhyuseanRCX?

I read on [Website] that I can’t use the USB IR tower with64-bit Windows! Is that true?Yes, unless you want to program in ROBOLAB. See section 3.2.1 for moreinformation.

Can I send data to the RCX from a [TV remote/IR porton an old laptop/IR LED and an Arduino]?The short answer is no. The IR towers and remote for the RCX use a proprietarycommunications protocol, which no one has reverse-engineered and which isincompatible with the protocols used by television remotes or IR transmitterson older laptops.

I no longer want my RCX bricks/motors/sensors! Whatshould I do with them?Probably the best thing to do is to sell them on eBay or Bricklink. If for somereason you don’t want to do that, send me an email ([email protected])– maybe I’ll take it off your hands.

I want my RCX to play music!This is a surprisingly common thing to want to do. The easiest way I know of isto find or compose a piece of music in the Ring Tone Text Transfer Language 23

(RTTTL), and then use ROBOTC for RCX, which includes a tool (only visibleif using menu-level "superuser") for transferring RTTTL tunes to ROBOTCcommands which cause the RCX to play the described tune.

Can I use RCX motors or sensors with the NXT or EV3?What about with an Arduino or Raspberry Pi?A converter cable24 is available which converts the connector used by RCXmotors and sensors to the RJ12 connector used by the NXT and EV3. TheNXT was designed to be backwards-compatible with RCX motors and sensors,and it’s easy to do this in ROBOLAB 2.9 or NXT-G (with the download ofsome additional sensor blocks for NXT-G).

Unfortunately, due to the EV3 using a slightly different pinout for the sensorports, the LEGO converter cable will not connect RCX sensors to the EV3.Others have produced homemade converter cables which connect the sensors tothe correct pins on the EV3, but in any case RCX sensors are unsupported in theofficial EV3 software, so use of such converters would have to be in conjunctionwith a third-party firmware such as LeJOS or ev3dev 25.

23https://en.wikipedia.org/wiki/Ring_Tone_Transfer_Language24Part x167625http://ev3dev.org

14

Page 15: Using the LEGO Mindstorms RCX in 2017 - John … · Using the LEGO Mindstorms RCX in 2017 John Holbrook | lego@johnholbrook.us | May 2017 Contents 1 Introduction 2 2 WhyuseanRCX?

I’m having troube downloading firmware or otherwise trans-ferring large programs or files to the RCX!In my experience, the most common cause of communications failures is inter-ference from bright room or outside light. When downloading firmware or largefiles to the RCX, I find it helpful to place a box or other opaque structure overthe RCX and IR tower in order to prevent visible light interference.

15