| Description |
The two-button remote control is a very versatile
program for controlling
Lego robots. It uses a series of touch sensor Switches to determine
which
behavior you want to trigger. Since the Switches are between a set of
Loops, the program loops infinitely, and the behavior of the robot
will change every time a different touch sensor is hit.
In this program, the two-button remote
is setup to control a car
with motors connected to Ports B and C. When only touch sensor 1 is
pressed, Motor B spins forward and Motor C spins backward. This will
turn
the car left or right. When only touch sensor 2 is pressed, the
motors are reversed and the car will spin the opposite direction.
If both touch sensors are held, the motors go forward. When no touch
sensors are held, the car does not move. Remember, each branch of
the Switch can control something different. It does not only work
for a car. The touch sensors can trigger music, events, even mail
to other robots. The possibilities are endless.
|