# Программирование LEGO EV3 для Virtual Robotics Toolkit в TRIK Studio

TRIK Studio можно использовать для написания программ для симулятора контроллера LEGO EV3 [Virtual Robotics Toolkit](https://www.virtualroboticstoolkit.com/) (VRT).

Для написания и загрузки программы в VRT необходимо:

1. На визуальном языке [написать программу ](/studio/programming-visual.md)для [LEGO EV3](/ev3/run-upload-programs.md).
2. В любом из режимов робота LEGO EV3 («Автономный режим (USB)», «Автономный режим (Bluetooth)», «Интерпретатор (USB)», «Интерпретатор (Bluetooth)») нажать кнопку «Загрузить программу». В результате этого создастся исполняемый файл `.rbf` в папке `%APPDATA%\trik-studio\ev3-rbf`.
3. Запустить VRT.
4. Запустить [EV3 Explorer](https://sites.google.com/site/ev3basic/ev3-explorer) и подключиться к виртуальному роботу в VRT по Wi-Fi (IP-адрес: `127.0.0.1`).
5. Отправить исполняемый файл `.rbf` на виртуального робота.
6. Запустить загруженный в VRT файл.

## Пример программы в TRIK Studio для VRT

Алгоритм:

![](/files/-MOfXgWbRGBVHoxJBBYa)

Исполнение в VRT:

![](/files/-MOfYDhPkYiEi6kJ9phr)

{% hint style="info" %}
Благодарим Алексея Михайловича Клячина за помощь при написании статьи.
{% endhint %}


---

# 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/ev3/ts-for-vrt.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.
