Skip to main content

Step Control Widget

⚡ Control

The Step Control provides Up (▲) and Down (▼) buttons that increment or decrement a value by a configurable step size. The current value is shown between the buttons. Unlike a Slider, the Step Control lets you make precise small adjustments.

Default size: 2 × 2 grid cells


Configuration

PropertyTypeDefaultDescription
minnumber0Minimum value (clamps on decrement)
maxnumber100Maximum value (clamps on increment)
stepnumber1Amount added/subtracted per click
initialValuenumber0Starting value when first rendered
DevicedeviceThe device to write to
PinV0V255The virtual pin to write
LabelstringWidget label

Firmware example

int targetTemp = 20;  // default setpoint

VWIRE_RECEIVE(V0) {
targetTemp = constrain(param.asInt(), 15, 30);
setThermostatTarget(targetTemp);

// Echo back so display stays correct
Vwire.virtualSend(V0, targetTemp);
}

Common step sizes

Use caseminmaxstep
Thermostat °C15300.5
Volume %01005
LED brightness02555
Stepper motor steps01000010
Timer minutes1601

Pair with Value Display

A common pattern: place a Step Control next to a Value Display on the same pin.
The Step Control writes the setpoint; the Value Display always shows the device-echoed value.