Value Display Widget
The Value Display widget shows the latest value of a virtual pin in large, readable text. Add a prefix or suffix to give the value context (e.g. °C, %, kg).
Default size: 2 × 2 grid cells
Configuration
| Property | Type | Default | Description |
|---|---|---|---|
prefix | string | `` | Text shown before the value |
suffix | string | `` | Text shown after the value (unit label) |
fontSize | number | 32 | Font size in pixels |
| 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();
float temp = readTemperature();
float hum = readHumidity();
int pressure = readPressure();
Vwire.virtualSend(V0, temp); // displayed as "23.5 °C"
Vwire.virtualSend(V1, hum); // displayed as "61 %"
Vwire.virtualSend(V2, pressure); // displayed as "1013 hPa"
delay(2000);
}
Formatting tips
| Value | prefix | suffix | Displayed as |
|---|---|---|---|
23.5 | `` | °C | 23.5 °C |
61 | `` | % | 61% |
1013 | `` | hPa | 1013 hPa |
0.98 | $ | `` | $0.98 |
12 | V | `` | V12 |
Display tips
- Use fontSize: 48 for a single large metric in a 2×2 cell.
- Use fontSize: 24 when combining multiple values in a smaller cell.
- For values with many decimal places, round on the device:
Vwire.virtualSend(V0, round(temp * 10) / 10.0);