# Sensory Variables for the LEGO EV3 Controller

{% hint style="info" %}
This article is automatically translated from Russian by Google Translator.
{% endhint %}

In addition to [constant](/en/studio/programming-visual/expression-syntax/const.md), 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                                                                                                                                                                                   |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong><code>buttonBack</code></strong></p><p><strong><code>buttonDown</code></strong></p><p><strong><code>buttonEnter</code></strong></p><p><strong><code>buttonLeft</code></strong></p><p><strong><code>buttonRight</code></strong></p><p><strong><code>buttonUp</code></strong></p> | <p>State of the buttons on the robot body: "Back", "Down", "Enter", "Left", "Right", "Up" respectively.<br></p><p>Possible values: <br>0 - button not pressed. <br>1 - button is pressed.</p> |
| <p><strong><code>encoderA</code></strong></p><p><strong><code>encoderB</code></strong></p><p><strong><code>encoderC</code></strong></p><p><strong><code>encoderD</code></strong></p>                                                                                                       | Encoder readings on ports A, B, C, D, respectively.                                                                                                                                           |
| <p><strong><code>sensor1</code></strong></p><p><strong><code>sensor2</code></strong></p><p><strong><code>sensor3</code></strong></p><p><strong><code>sensor4</code></strong></p>                                                                                                           | Sensor readings on ports 1, 2, 3, 4 respectively.                                                                                                                                             |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.trikset.com/en/ev3/sensory-variables.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
