RCX Programming


Lesson 3

In this lesson we will use the infrared transmitter/receiver of the RCX to realize a LEGO build remote controller for a LEGO car. The operations of the remote controller and the behaviour of the car are determined by two RCX programs. The remote controller has two touch buttons, a left and right button. When the left/right button is pressed the left/right motor of the car should be on, when the button is released the motor should be off. This makes it possible to use the buttons to control the behaviour of a car.

A simple program for a remote controlled car is (Car.c). A simple program for the remote controller is (RemoteControl.c). The IRReceive and IRTransmit routines are implemented in the module IR.h.

Now we want to remote control the car from Lesson2 that can follow a line by means of light sensors pointing to the floor. When the car is on the line it should not be controllable by commands from the remote controller. But when the car has been off line for a while the car should react to remote commands.


Access to the other include and source files.
Last update: 15-02-04