| SETSENSOR | |||||||||||||||||||||||
| Syntax | SETSENSOR number type (SETSENSOR number type datatype) (SETSENSOR number type datatype slope) |
||||||||||||||||||||||
| Explanation | The RCX robot controller has three
inputs which may be connected to different types of
sensors. Before using a sensor, it is necessary to define
the type of sensor which is attached to the input, as
well as the format of the data which the sensor is
expected to deliver. The first input is the number of the
sensor or a list of sensor numbers. Valid numbers are 1
through 3. There are four different sensor types. One of these values must be entered as a second input.
The format of the data that the sensor delivers is dependent on another keyword, which may be supplied as an optional, third input:
A last, fourth input determines the slope, which is the value difference between the Boolean levels 0 and 1. Valid numbers are 0 through 31, where small numbers mean a small difference. Use the RCX.PANEL command
to display the RCX panel which displays the contents of
all variables, sensors, and timers. |
||||||||||||||||||||||
| Examples | SETSENSOR 1 "TEMP (Sensor 1 is defined as a temperature sensor) (SETSENSOR 2 "SWITCH "RAW) (Sensor 2 is defined as a switch with raw input) SETSENSOR [1 2] "SWITCH (Sensors 1 and 2 are defined as a switches) |
||||||||||||||||||||||