> For the complete documentation index, see [llms.txt](https://help.trikset.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.trikset.com/en/trik/programming-code/object-brick/class-battery.md).

# Class «battery»

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

Provides access to information about the battery or power supply unit.

## readVoltage

Returns the current-voltage of the battery (or power supply) in volts.

#### Syntax

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

```javascript
brick.battery().readVoltage();
```

{% endtab %}

{% tab title="Python" %}

```
brick.battery().readVoltage();
```

{% endtab %}
{% endtabs %}
