Skip to main content

LED Widget

👁 Display

The LED widget renders a small colored circle that lights up or dims based on a virtual pin value. Ideal for showing boolean states: alarm on/off, pump running, door open/closed.

Default size: 1 × 1 grid cells


Configuration

PropertyTypeDefaultDescription
onColorhex color#10B981Color when value equals onValue
offColorhex color#6B7280Color when value does not match onValue
onValuestring1The value that triggers the ON state
DevicedeviceThe device to read from
PinV0V255The virtual pin to display
LabelstringWidget label

Firmware example

void loop() {
Vwire.run();

bool motionDetected = digitalRead(PIR_PIN);
bool doorOpen = digitalRead(DOOR_PIN);

Vwire.virtualSend(V5, motionDetected ? 1 : 0);
Vwire.virtualSend(V6, doorOpen ? 1 : 0);

delay(200);
}

Semantic color palette

StateColorHex
OK / ONGreen#10B981
WarningAmber#F59E0B
ErrorRed#EF4444
InfoBlue#3B82F6
InactiveGray#6B7280

Multiple LEDs as a status board

Place several 1×1 LED widgets in a row to create a simple multi-channel status board:

PinLabelColor
V5Motion#EF4444
V6Door#F59E0B
V7Pump#10B981
V8Alarm#EF4444