> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hyperwisor.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Attitude Indicator

> An aircraft-style roll/pitch instrument, driven from firmware.

<Info>
  **Category:** Display · **Reads data:** yes (roll/pitch) · **Sends commands:** no
</Info>

## Mental model

An **Attitude Indicator is an aircraft artificial horizon.** It shows **roll** and
**pitch** as a tilting horizon — for drones, vehicles, boats, or any IMU-equipped
device.

## When to use it

* Orientation from an IMU (MPU6050, etc.)
* Roll/pitch visualization

## Settings

### Style

* **Display type** · **aircraft symbol**
* **Sky / ground color**
* **Instrument size** · **animation speed**
* **Show degree markings** · **value indicators**

## Example — drive from an IMU

The Arduino library has a dedicated helper:

```cpp theme={null}
device.updateFlightAttitude(targetId, "adi", roll, pitch);   // degrees, from your IMU
```

## Script API example

The same interactions from a [dashboard script](/script/overview):

```js theme={null}
ws.onMessage((msg) => {
  if (msg.roll !== undefined) widget.setText('rollLabel',  msg.roll  + '\u00b0');
  if (msg.pitch !== undefined) widget.setText('pitchLabel', msg.pitch + '\u00b0');
});
```

<Card title="Compass" icon="compass" href="/dashboard/widgets/compass">
  For heading instead of roll/pitch.
</Card>
