Skip to main content

LCD Widget

👁 Display

The LCD widget simulates a character LCD screen with a retro green-on-black or amber-on-black look. It supports up to 4 rows and arbitrary column widths. Send text lines from your device or build multi-value dashboards with a single widget.

Default size: 3 × 2 grid cells


Configuration

PropertyTypeDefaultDescription
rows1 | 2 | 42Number of display rows
colsnumber16Characters per row
themegreen | amber | bluegreenScreen color theme
DevicedeviceThe device to read from
PinV0V255The virtual pin for display data
LabelstringWidget label

Sending data to the LCD

Single-line string

Vwire.virtualSend(V0, "Hello VWire!");

Multi-line: use \n separator

char buf[64];
float temp = 23.5, hum = 61.0;
snprintf(buf, sizeof(buf), "Temp: %.1f C\nHum: %.0f %%", temp, hum);
Vwire.virtualSend(V0, buf);

This renders as:

Temp: 23.5 C
Hum: 61 %

Structured multi-row with JSON

char buf[128];
snprintf(buf, sizeof(buf),
"[\"Temp: %.1f C\",\"Hum: %.0f%%\",\"Pres: %d hPa\",\"UV: %.1f\"]",
temp, hum, pres, uv);
Vwire.virtualSend(V0, buf);

Format tricks

TechniqueHow
Right-align a number in 16-char rowsnprintf(buf, 17, "%16.1f C", temp)
Blinking textAlternate the string every push with spaces
Progress bar in ASCII[######## ] 80%
Custom charactersNot supported (font is fixed)

Tips

Push only on change

To avoid unnecessary traffic, compare the previous display string and skip virtualSend if nothing changed.