Sensory Variables for the LEGO EV3 Controller
This article is automatically translated from Russian by Google Translator.
In addition to constant, TRIK Studio has reserved variables that store the values of readings of the sensors connected to the corresponding ports.
These values can be assigned to variables and used in mathematical expressions.
Variable | Description |
buttonBack buttonDown buttonEnter buttonLeft buttonRight buttonUp | State of the buttons on the robot body: "Back", "Down", "Enter", "Left", "Right", "Up" respectively.
Possible values:
0 - button not pressed.
1 - button is pressed. |
encoderA encoderB encoderC encoderD | Encoder readings on ports A, B, C, D, respectively. |
sensor1 sensor2 sensor3 sensor4 | Sensor readings on ports 1, 2, 3, 4 respectively. |