# Класс «led»

Предоставляет управление светодиодом на корпусе робота.

| Метод                                                             | Описание                                |
| ----------------------------------------------------------------- | --------------------------------------- |
| [red](/trik/programming-code/object-brick/class-led.md#red)       | Включает светодиод в режим «красный».   |
| [green](/trik/programming-code/object-brick/class-led.md#green)   | Включает светодиод в режим «зеленый».   |
| [orange](/trik/programming-code/object-brick/class-led.md#orange) | Включает светодиод в режим «оранжевый». |
| [off](/trik/programming-code/object-brick/class-led.md#off)       | Выключает светодиод.                    |

## red

Включает светодиод в режим «красный».

#### Синтаксис

{% tabs %}
{% tab title="Python" %}

```
brick.led().red()
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
brick.led().red();	
```

{% endtab %}
{% endtabs %}

## green

Включает светодиод в режим «зеленый».

#### Синтаксис

{% tabs %}
{% tab title="Python" %}

```
brick.led().green()
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
brick.led().green();	
```

{% endtab %}
{% endtabs %}

## orange

Включает светодиод в режим «оранжевый».

#### Синтаксис

{% tabs %}
{% tab title="Python" %}

```
brick.led().orange()
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
brick.led().orange();
```

{% endtab %}
{% endtabs %}

## off

Выключает светодиод.

#### Синтаксис

{% tabs %}
{% tab title="Python" %}

```
brick.led().off()
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
brick.led().off();
```

{% endtab %}
{% endtabs %}


---

# 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/trik/programming-code/object-brick/class-led.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.
