Eurologo2007Workshop - RCX-robot steered from Imagine Logo

From RoboWiki
Revision as of 11:25, 20 March 2008 by Palo (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

back to main page

See also: Imagine plus RCX

You certainly can control RCX from Logo in many different ways. The way we will try here is to pre-program your RCX robot in some way (for example using standard Mindstorms Robotics Invention System or using NQC) to react to infra-red (IR) messages. From your own project in Logo, we will then generate the IR signals sent over to the RCX robot from the IR tower.

Let's begin with pre-programming the RCX. We recommend using the NQC language with BricX environment, which can be downloaded here:

  • BricX (download the test release from there, and install it on local drive). Make sure you use the newer firmware for RCX which has better features. It is included on the Mindstorms CD, but you can get it for example here: [1]. If you need to download also NQC (normally NQC is included in BricX), you can do it from here: NQC.
  • NQC is text-oriented C-like language. You can control the motors with simple commands such as On(OUT_A), Float(OUT_A), or read sensors using variables SENSOR_1, SENSOR_2, and setup their mode using SetSensorType(). BricX contains good help and you can download manual here:

NQC Docs

So let us start simple. Download the following program to NQC:

rcx.nqc

It listens for IR messages and contols RCX motors accordingly.

Once downloaded, start the program, and open the following project in Imagine logo:

rcx.imp

(save it to Imagine main folder)

And you also need the driver for USB LEGO IR-tower: tower164.zip and an external utility that sends IR messages over USB tower: ir3.zip - uncompress it to the Imagine folder please.

If you run into any difficulties, please contact us.