Slider

Docs / Widgets / Controls / Slider
Control widget

Slider

A Slider sends a number in a range: motor speed, LED brightness, a set temperature. Drag it and the device gets the new value.

Dashboard → deviceSends a numberRange from the Telemetry Point7 styles

Try it

Drag the slider. With Get Value Instantly the fan speed follows while you drag. Switch Value Update Mode to Get Value On Drop and the value is sent only when you let go.

SimulationLIVE
Dashboard
This is the real widget from the dashboard.
Your device
NuttyFiMCU · Wi-FiONLINENUTTYFITP0PWM: 0
The board reads the Telemetry Point and sets the fan speed (PWM 0–255).
Slider Style
Value Update Mode
Slider Orientation
Widget Color
Show
The range comes from the Telemetry PointThe slider runs from the point's MIN to MAX, rounded to its DECIMALS. This example uses 0 to 255, a common PWM range.

How to add and set up

  1. Open the dashboard in edit modeOpen the device and turn on editing.
  2. Add a SliderPress + on the right edge of the canvas and pick Slider. Drag it into place.
  3. Open its settingsClick the gear icon on the widget. The window title shows the widget's name.
  4. Link a Telemetry PointUnder Linked Telemetry Points, pick the point your code reads and set its MIN and MAX.
  5. Pick style and update modeChoose a Slider Style, the orientation and Value Update Mode. Save, then press DONE.

Settings

SettingWhat it does
Widget NameThe title shown on the widget.
Label ColorColour of the title.
Linked Telemetry PointsThe Telemetry Point (TP0, TP1…) the widget uses. Your device code uses the same point.
Slider StyleClassic, Glow, Bars, Ruler, or a rotary Knob, Dial or Meter. Try them all in the simulation above. Ruler, Knob, Dial and Meter need Starter or above.
Slider OrientationHorizontal (Left to Right) or Vertical (Bottom to Top). Knob, Dial and Meter turn instead, so they have no orientation.
Value Update ModeGet Value Instantly: sends while you drag, at most one value every 250 ms, and always the final value. Get Value On Drop (default): sends once, when you let go.
Telemetry Point settingsThe linked point carries the DATA TYPE (integer or double), UNITS, MIN, MAX, DECIMALS and DEFAULT the widget uses.
Widget ColorColour of the filled part of the slider and of the value.
Hide widget Name / Telemetry Point / Widget BorderHide the title, the TP badge or the outline around the tile.

Instantly or On Drop?

UseMode
Brightness, fan speed: you want to see it changeGet Value Instantly
Set points, motor targets: only the final value mattersGet Value On Drop

Receive commands on your device

A Slider writes a number between the Telemetry Point's MIN and MAX. The examples use TP0 with MIN 0 and MAX 255, like the fan in the simulation.

C++ · Arduino
SME_LISTEN(TP0)
{
  int speed = data.toInt();       // 0 to 255
  analogWrite(FAN_PIN, speed);    // PWM: fan speed or LED brightness
}

SME_LISTEN(TP0) runs every time the dashboard writes TP0. data holds the value it sent, as text: use data.toInt() for whole numbers or data.toFloat() for decimals.

ESP8266 PWM rangeFrom ESP8266 core 3.0 analogWrite() takes 0 to 255. On older cores it takes 0 to 1023: add analogWriteRange(255); in setup(), or set the Slider's MAX to 1023.

These are snippets. Your sketch also needs #include <SMEIoT.h>, SME.begin(...) in setup() and SME.run() in loop(). The full sketch tab shows a complete example; see the SDK quick start for more.

Was this page helpful?