Step Control Widget
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
| Property | Type | Default | Description |
|---|---|---|---|
min | number | 0 | Minimum value (clamps on decrement) |
max | number | 100 | Maximum value (clamps on increment) |
step | number | 1 | Amount added/subtracted per click |
initialValue | number | 0 | Starting value when first rendered |
| Device | device | — | The device to write to |
| Pin | V0–V255 | — | The virtual pin to write |
| Label | string | — | Widget 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 case | min | max | step |
|---|---|---|---|
| Thermostat °C | 15 | 30 | 0.5 |
| Volume % | 0 | 100 | 5 |
| LED brightness | 0 | 255 | 5 |
| Stepper motor steps | 0 | 10000 | 10 |
| Timer minutes | 1 | 60 | 1 |
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.