LED
An LED shows a state your device reports: a door open, a motor running, a tank full. As a Bulb it is simply on or off. As a Solid Dot it dims with the value, from off at MIN to full brightness at MAX.
Try it
The board's code writes TP0. Press and hold the red BUTTON: it sends 1 and the Bulb lights. Switch LED Style to Solid Dot, set MAX to 255 and turn the knob to dim it.
How to add and set up
- Open the dashboard in edit modeOpen the device and turn on editing. Widgets now show a toolbar and a resize handle.
- Add an LEDPress + on the right edge of the canvas and pick LED. Drag it into place and resize it with the round handle.
- Open its settingsClick the gear in the widget's toolbar. The window opens with a Live Preview on the left.
- Link a Telemetry PointIn Linked Telemetry Points, pick the point your device writes, for example
TP0. Check MIN and MAX in Configure TP and press Save TP Settings. - Pick a style and colourIn LED Configuration, choose Bulb or Solid Dot. Pick a Widget Color, then press DONE.
The settings window, section by section
Open the window from the widget's toolbar: turn on edit mode and click the gear. On the left is a Live Preview of the tile that blinks the LED once so you see both the on and off look. Nothing changes on the dashboard until you press DONE; CANCEL or ✕ throws the changes away.
1. General Settings
| Setting | What it does |
|---|---|
| Widget Name | The title in the top-left of the tile, up to 20 characters. Name it after what it shows, like Door, Pump running or Tank full. Empty = LED. |
| Label Color | Colour of the title only. Pick one of the colours, or press + to choose any colour. |
| Hide widget Name | Hides the title. |
| Hide Telemetry Point | Hides the small TP0 badge. The link still works. |
| Hide Widget Border | Removes the coloured outline around the tile. |
2. Linked Telemetry Points
Pick the point your device's code writes, from TP0 to TP127. A new LED isn't linked to anything, so it stays off until you link it. The pencil opens Configure TP:
| Field | What it means for the LED |
|---|---|
| DATA TYPE | integer for whole numbers (0, 1, 255) or double for decimals. Use integer for a simple on/off LED. |
| UNITS | None, °C, °F, %, V, A, W or Custom. The LED doesn't show a unit, but other widgets on the same point do. |
| MIN | The value that means off. Default 0. |
| MAX | The value that means on (Bulb) or full brightness (Solid Dot). Default 1. MAX must be bigger than MIN. |
| DECIMALS | Only for double: how many decimal places to keep. |
These settings belong to the Telemetry Point, so every widget linked to the same point uses the same MIN and MAX.
3. LED Configuration
Bulb: a bulb icon inside the circle, off (grey) or on (filled with the Widget Color). Best for yes/no states. Solid Dot: a plain circle that dims with the value — min = off, max = full brightness. Best for levels, like a PWM output or a light sensor.
4. Widget Color
The colour of the lit LED and of the tile's outline.
What the LED shows for each value
The LED reads the linked Telemetry Point and compares it with that point's MIN and MAX.
| Style | Device sends | LED shows |
|---|---|---|
| Bulb | MIN (default 0) | Off: grey circle, grey bulb |
| Bulb | MAX (default 1) | On: circle filled with the Widget Color, white bulb |
| Solid Dot | MIN … MAX | Brightness follows the value. With MIN 0 and MAX 255, sending 128 lights it about half way. |
255 for an 8-bit PWM value or 100 for a percentage.Send data from your device
The LED shows the value your board writes with SME.publish(), on the same point you linked on the dashboard. The examples use TP0.
SME.publish(TP0, 1); // LED on (MAX) SME.publish(TP0, 0); // LED off (MIN)
int state = (digitalRead(BUTTON_PIN) == LOW) ? 1 : 0; // pressed = 1
if (state != lastState) { // only when it changes
SME.publish(TP0, state);
lastState = state;
}int level = map(analogRead(A0), 0, 1023, 0, 255); // 0 to 255 SME.publish(TP0, level); // 128 = about half brightness
SME_LISTEN(TP0) // the Switch writes TP0
{
int on = data.toInt();
digitalWrite(2, on); // switch the relay or lamp
SME.publish(TP1, on); // the LED on TP1 shows the result
}#define DASHBOARD_ID "PROJ-XXXXXXXX"
#define DEVICE_TOKEN "SME-XXXX-XXXX-XXXX"
#define FIRMWARE_VERSION "1.0.0"
#define WIFI_SSID "your_wifi"
#define WIFI_PASS "your_pass"
#include <SMEIoT.h>
#define BUTTON_PIN 4
int lastState = -1;
void setup()
{
Serial.begin(115200);
pinMode(BUTTON_PIN, INPUT_PULLUP);
SME.begin(DASHBOARD_ID, DEVICE_TOKEN, FIRMWARE_VERSION,
WIFI_SSID, WIFI_PASS);
}
void loop()
{
SME.run(); // keeps the link alive
int state = (digitalRead(BUTTON_PIN) == LOW) ? 1 : 0; // pressed = 1
if (state != lastState) { // only when it changes
SME.publish(TP0, state); // LED on TP0
lastState = state;
}
}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.
Move, resize and the widget toolbar
Turn on edit mode to change the layout. Each widget then shows a small toolbar at its top-right:
| Button | What it does |
|---|---|
| Info | A short card: what the LED does, its linked point and style, and a link to this guide. |
| Settings | Opens the settings window described above. |
| Duplicate | Adds a copy with the same settings. Change its linked point to watch something else. |
| Delete | Removes the widget from the dashboard. |
On a small tile the toolbar folds into a ⋮ menu with the same actions; inside a Container it also has Remove from Container. Move: drag the tile. Resize: drag the round handle at the bottom-right corner — the circle grows with the tile.
Troubleshooting
| What you see | Check |
|---|---|
| The LED never lights | Is a Telemetry Point linked? A new LED has none, and no TP badge shows. Link the point your device writes. |
| Still off after linking | Is it the same point the code writes? TP1 on the dashboard won't see values sent to TP0. |
| Off even though the device sends a value | For Bulb, the device must send the point's MAX. If MAX is 255 and the code sends 1, it stays off — try it in the simulation. |
| Solid Dot is only on or off | MAX is still 1. Raise it, for example to 255, and save the Telemetry Point. |
| The dashboard didn't change after editing | Changes only apply after DONE. |
| Nothing updates at all | Is the device online? The LED only shows values the device sends. |
Docs