Skip to main content

Slider Widget

⚡ Control

The Slider lets you drag a handle across a numeric range and sends the selected value to a virtual pin in real time. Perfect for dimmer controls, motor speed, servo angle, or any continuously variable output.

Default size: 3 × 1 grid cells


Configuration

PropertyTypeDefaultDescription
minnumber0Minimum value
maxnumber255Maximum value
orientationhorizontal | verticalhorizontalSlider direction
colorhex color#3B82F6Track fill color
DevicedeviceThe device to write to
PinV0V255The virtual pin to write to
LabelstringWidget label

Firmware example

// LED dimmer (0–255)
VWIRE_RECEIVE(V3) {
int brightness = param.asInt(); // 0–255
analogWrite(LED_PIN, brightness);
}

// Servo angle (0–180)
VWIRE_RECEIVE(V4) {
int angle = param.asInt();
myServo.write(angle);
}

// Motor speed percentage (0–100)
VWIRE_RECEIVE(V5) {
float percent = param.asFloat();
int pwm = map(percent, 0, 100, 0, 255);
analogWrite(MOTOR_PIN, pwm);
}

Step values

Use caseminmaxstep
LED brightness02551
Servo angle01801
Fan speed %01005
Temperature setpoint16300.5
Volume01002

Orientation

  • Horizontal — standard left-to-right; recommended for wide layouts (3×1 default)
  • Vertical — bottom-to-top; use in a taller cell (1×3 or 2×3) for fader-style controls