Valiant Technology Ltd

Feedback Form

ROAMER CONTROL:
USING THE OUTPUTS

In the iast issue of "GO" Marcus Topham, Senior IT Development Officer in Bradford, explained that Roamer has four Two-State Outputs and that these can be programmed to be in one of two states, either High or Low. When a lamp is connected between the Output and Ground and the Output is set High, a current will flow and the lamp will light. In this article Marcus explores how outputs can be used in classroom work.

To program an output press followed by a number from 1 to 4 to specify which output, then press to set it Low or to set it High. For example, if a lamp is connected at Output 3, lights it up.

Turning on Lights Children could make a Roamer car, build a tunnel and program the car to drive through it, switching its headlights on while it is in the tunnel.
The car has headlights connected at Outputs 1 and 2.

Drive to tunnel.
Set Output 1 High. Headlights on.
Drives through tunnel with lights on.
Set Output 1 Low. Headlights off.
Drives away from tunnel.
The Roamer car drives to the tunnel, turns its headlights on, drives through the tunnel, turns the lights off and drives away.

Flashing Lights: There are two ways to make a light flash.

1. Connect a light at Output 4.
This causes the light to flash on and off ten times at one second intervals. (The Roamer will not move, turn or do anything else while the light is flashing).

2. Connect a Flasher Unit (provided in the Valiant Light Pack) to Output 4.
By setting the Output High the light connected to the unit will flash automatically, allowing the Roamer to continue with other activities. The program will make the light flash while the Roamer turns through 90 degrees.


Direction of Turn: In all Valiant documentation, the following convention has been adopted for describing a motor's direction of turn.

Driving a DC Motor When a DC motor is connected to an Output and the Output is set High, the motor will turn but in only one direction. To reverse the direction of the motor it is necessary to swap the wires to the Output and Ground terminals.

Programming the Direction of a DC Motor The motor may be programmed to turn in either direction by connecting it to two Output terminals, rather than to an Output and a Ground.


Make a Roamer submarine. Connect the motor to Output 1 and Output 2. Program the submarine propeller to 'drive' the submarine forward and backwards.

Set Output 1 High (Output 2 will be Low) and the motor will turn clockwise.
The Roamer moves forward with the motor turning the propeller clockwise.
Set Output 1 Low. (Output 2 Low). The motor stops.
The submarine stays still for 5 seconds. The propeller does not turn.
Set Output 2 High. (Output 1 Low) and the motor will turn anticlockwise.
The Roamer will move backwards with the motor turning the propeller anticlockwise.
Help! The Outputs Don't Work
If you connect a light at Output 1 and, for example, enter it may appear that the light does not turn on. (The same thing would happen if the instruction was entered at the end of a GO program)
sets Output 1 High. Since there are no further instructions in the GO program, it immediately returns to its original state, with Output 1 Low. The light turns on and off so quickly you don't see it.

NEXT ISSUE: Using a stepper motor.

Back
  © 2004. Amethyst Consultancy Ltd.