# Class «accelerometer»

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

Represents the [accelerometer](/en/trik/programming-code/object-brick.md#accelerometer) of the TRIK controller.

| Method                                                                     | Description                                                                                                            |
| -------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| [read](/en/trik/programming-code/object-brick/class-accelerometer.md#read) | Returns the current sensor reading as an array of three elements corresponding to the sensor readings along each axis. |

| Signal                                                                           | Description                                           |
| -------------------------------------------------------------------------------- | ----------------------------------------------------- |
| [newData](/en/trik/programming-code/object-brick/class-accelerometer.md#newdata) | The signal sent by the sensor when new data is ready. |

## read

Returns the current sensor reading as an array of three elements corresponding to the sensor readings along each axis.

#### Syntax

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

```javascript
brick.accelerometer().read();
```

{% endtab %}

{% tab title="Python" %}

```
brick.accelerometer().read();
```

{% endtab %}
{% endtabs %}

## newData

The signal sent by the sensor when new data is ready.


---

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