Gauge Widget
The Gauge widget renders a circular arc that fills proportionally between a min and max value. Ideal for battery level, CPU load, fill percentage, or any bounded metric.
Default size: 2 × 2 grid cells
Configuration
| Property | Type | Default | Description |
|---|---|---|---|
min | number | 0 | Value at 0% arc fill |
max | number | 100 | Value at 100% arc fill |
unit | string | `` | Unit label shown in the center |
color | hex color | #3B82F6 | Arc fill color |
| Device | device | — | The device to read from |
| Pin | V0–V255 | — | The virtual pin to display |
| Label | string | — | Widget label |
Firmware example
void loop() {
Vwire.run();
int batteryPercent = analogRead(BATT_PIN) * 100 / 1023;
Vwire.virtualSend(V0, batteryPercent); // 0–100
delay(5000);
}
Common setups
| Use case | min | max | unit | color |
|---|---|---|---|---|
| Battery % | 0 | 100 | % | #10B981 |
| Temperature | -20 | 80 | °C | #F59E0B |
| Humidity | 0 | 100 | % | #3B82F6 |
| CPU load | 0 | 100 | % | #EF4444 |
| Pressure | 900 | 1100 | hPa | #8B5CF6 |
Gauge vs Analog Gauge
| Feature | Gauge | Analog Gauge |
|---|---|---|
| Style | Circular arc | Needle / dial |
| Color zones | Single color | Up to N colored zones |
| Visual feedback | Fill amount | Needle position |
| Best for | Percentage, level | Signal strength, speed, temperature |