Gauge

Docs / Widgets / Displays / Gauge
Display widget

Gauge

A Gauge shows a reading on a dial, so you can see at a glance how close it is to the limit: pressure, speed, tank level. Eight styles, with optional colour zones.

Device → dashboard8 stylesColor Zones1 Telemetry Point

Try it

Turn the sensor knob on the board and watch the dial follow. Try the styles, and turn on Use Color Zones to colour the dial by how high the value is.

SimulationLIVE
Dashboard
This is the real widget from the dashboard.
Your device
NuttyFiMCU · Wi-FiONLINENUTTYFI0writes TP0Pressure (bar)
Sensor knob (0–10 bar)
The board measures and writes the Telemetry Point.
Gauge Configuration
Color Zones
Widget Color
Show
Zones or your own colourWith Use Color Zones on, the dial is green below half of the range, orange up to 80 % and red above. To pick your own colour, turn Color Zones off first; the settings window reminds you.

How to add and set up

  1. Open the dashboard in edit modeOpen the device and turn on editing.
  2. Add a GaugePress + on the right edge of the canvas and pick Gauge. 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 device writes and set its MIN, MAX and UNITS.
  5. Pick a styleChoose a Gauge Configuration style and decide on Use Color Zones. 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.
Gauge styleFull Circle · Semicircular Arc · Needle Style · Tick Ring · Segments · Scale Arc · Dot Ring · Sector Dial. Try all eight in the simulation above. Tick Ring, Segments, Scale Arc, Dot Ring and Sector Dial need Starter or above.
Use Color ZonesColours the dial green, orange and red as the value rises. Needs Starter or above.
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 dial when Color Zones is off.
Hide widget Name / Telemetry Point / Widget BorderHide the title, the TP badge or the outline around the tile.

What it reads

The dial runs from the Telemetry Point's MIN to MAX; MIN and MAX are printed under it. This example uses 0 to 10 bar.

<50%
GreenBelow half of the range
<80%
OrangeGetting close
80%+
RedNear the limit

Send data from your device

A Gauge shows the number your board writes with SME.publish(). The examples use TP0.

C++ · Arduino
float bar = analogRead(A0) * 10.0 / 1023;   // 0 to 10 bar

SME.publish(TP0, bar);
Send when something changesDon't publish on every pass of loop(). Send when the value changes, or on a timer, for example every one or two seconds.

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?