> ## 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.

# Lesson 2 — Push a Sensor Value

> Send a reading from firmware to a dashboard Gauge by its widget ID.

**Goal:** push a value from the device and watch a Gauge update live.

## 1. Add a Gauge to a dashboard

In the [Dashboard Designer](/dashboard/overview), drop a **Gauge** onto the
canvas. In its **General** tab, set the widget ID to `tempGauge`.

## 2. Push to that widget ID

The link between firmware and a widget is the **widget ID**. Push a value to it:

```cpp theme={null}
void loop() {
  device.loop();

  float temperature = readTemperature();        // your sensor
  device.updateWidget(targetId, "tempGauge", temperature);

  delay(2000);
}
```

`targetId` is where the value is routed (your dashboard/user). The Gauge bound to
`tempGauge` now reads the value — no polling, no refresh.

## 3. Watch it update

Open the dashboard in Preview. As the device sends values, the Gauge moves in real
time.

<Tip>
  `updateWidget` has typed overloads — `float`, `String`, and vectors of
  `float`/`int`/`String` — so you can push a single value or a series. See the
  [API reference](/firmware/arduino/api-reference#updating-widgets).
</Tip>

## How it works

This is the **up** half of the [core loop](/learn/how-it-works): firmware →
`updateWidget(targetId, widgetId, value)` → the bound widget. Next, the **down**
half: a command from the dashboard to the device.

<Card title="Next: control hardware" icon="arrow-right" href="/learn/lessons/03-control-hardware">
  Receive a command and drive a GPIO.
</Card>
