Class «sensor»
This article is automatically translated from Russian by Google Translator.
Represents a sensor (analog or digital) connected to ports A1, ..., A6, D1, D2.
read
Returns the current reading of the sensor (digital or analog) connected to this port. The present value is returned, depending on the port configuration, which is described in the file model-config.xml
in the trik
folder on the robot.
For example, the IR distance sensor returns a value in centimeters.
Syntax
readRawData
Returns the current raw reading of the sensor (digital or analog) connected to this port. The range of values depends on the specific sensor and does not take into account the configuration of the robot (the physical readings of the sensor are returned, e.g. the delay of the received ultrasonic signal).
Syntax
Last updated