# Сенсорные переменные для контроллера LEGO NXT

Кроме [констант](/studio/programming-visual/expression-syntax/const.md), в TRIK Studio доступны зарезервированные переменные, которые хранят значения показаний сенсоров, подключенных к соответствующим портам.

Эти значения можно присваивать переменным и использовать в математических выражениях.

| название                                                                                                                                                                                | описание                                                                                                                                                                                                                                                                              |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong><code>encoderA</code></strong></p><p><strong><code>encoderB</code></strong><br><strong><code>encoderC</code></strong></p>                                                    | Показания экодера на порту A, B или C соответственно.                                                                                                                                                                                                                                 |
| <p><strong><code>sensor1</code></strong></p><p><strong><code>sensor2</code></strong><br><strong><code>sensor3</code></strong><br><strong><code>sensor4</code></strong></p>              | Показания датчиков на портах 1, 2, 3, 4 соответственно.                                                                                                                                                                                                                               |
| <p><strong><code>buttonEnter</code></strong><br><strong><code>buttonEscape</code></strong><br><strong><code>buttonLeft</code></strong><br><strong><code>buttonRight</code></strong></p> | <p>Состояние кнопок на корпусе робота: «Ввод», «Отмена», «Влево», «Вправо» соответственно.<br><br>Возможные значения:</p><p>0 — кнопка не нажата. <br>1 — кнопка нажата.</p><p></p><p><strong>Внимание!</strong> В режиме генерации в C доступны только кнопки «Enter» и «Right».</p> |


---

# 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/nxt/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.
