| I/O | name | min. value |
max. value | meaning |
| |--> | SensorLight_n |
0 | 100 |
Input SensorLight_n (1<=n<=3) is a light sensor.
It returns the measured brightness as an int (percentage) with
0 = black and 100 = white. |
| |--> | SensorTouch_n |
0 | 1 |
Input SensorTouch_n (1<=n<=3) is a touch sensor.
It returns an int value of 0 as long as it is not touched and 1
otherwise. |
| |--> | SensorRot_n |
0 | 32766 |
Input SensorRot_n (1<=n<=3) is a rotation sensor.
It returns an int value obtained from the rotation sensor connected
to port n of the RCX. Rotation sensors count the number of 1/16
rotations of the axis connected to the sensor in a 16-bit (unsigned,
but only 15 bits are used)
register, wich may overflow. The sensor register
is incremented if the axis is turned 1/16 rotation in positive
turning direction, and decremented if the axis is turned in
negative direction. An
initial value for the sensor can be set using SensorRotSet_n.
Measuring rotations has to be started and stopped with
SensorRotOnOff_n. |
| |--> | Button_OnOff |
0 | 1 |
Returns an int value of 1 as long as the On/Off
button is
pressed and 0 as long as it is released. |
| |--> | Button_Run |
0 | 1 |
Returns an int value of 1 as long as the Run button is
pressed and 0 as long as it is released. |
| |--> | Button_View |
0 | 1 |
Returns an int value of 1 as long as the View button is
pressed and 0 as long as it is released. |
| |--> | Button_Pgrm |
0 | 1 |
Returns an int value of 1 as long as the Program
button is
pressed and 0 as long as it is released. |
| --> |
Motor_x_Speed |
0 | 100 |
Output Motor_x_Speed (x = [A|B|C]) sets the speed
value for motor x as an int (percentage) with 0 = motor off and
100 = full speed. |
| --> |
Motor_x_Direction | 0 |
3 |
Output Motor_x_Direction (x = [A|B|C]) sets the
rotation direction of motor x. The value is of type int;
0 = off/freewheeling, 1 = forward, 2 = reverse and
3 = brake. |
| --> |
Beep |
0 | 1 |
Make the RCX beep if the output value is 1. |
| --> |
SensorRotSet_n |
0 | 32766 |
Set an initial value for the rotation sensor
connected to port n (1<=n<=3). No value is written to
the respective RCX register if 32766 is passed. The axis
connected to the sensor should be fixed while the sensor is
initialised. If it is connectet to a motor, this can be achieved
by putting the motor into braking mode. |
| --> |
SensorRotOnOff_n |
0 | 1 |
Turn the rotation sensor
connected to port n (1<=n<=3) on (if 1 is passed) and
off (if 0 is passed). |