Vertical Level
The vertical version of Horizontal Level. Same options, oriented vertically — better for tank visualizations, thermometer feels, anything where up-and-down reads more naturally.
[image] Vertical Level on canvas at 60 %, gradient bottom-to-top, value displayed at the top
What it does
Same model as Horizontal Level — three styles (Solid, Gradient, Segmented), value display options, threshold-based color zones, optional external pointer (Left or Right positions). The fill goes from bottom to top; the gradient (when chosen) runs from start color at the bottom to end color at the top.
When to use it
- Reservoir level — Range 0–100 cm, segmented style for a fuel-gauge look.
- Vertical thermometer — Range -10 to 50 °C, gradient blue → red.
Properties
The Inspector opens as a bottom sheet with a Widget ID field at the top, then these sections in order.
Widget ID
| Property | Type | What it controls |
|---|---|---|
| Widget ID | text | Identifier used by your sketch (IVerticalLevel("…")). |
1. Essential
| Property | Type | Default | What it controls |
|---|---|---|---|
| Enabled | toggle | on | Whether the widget displays content. |
| Style | Solid / Gradient / Segmented | Solid | Bar visualization. |
| Value display | None / % / Value / Both | % | What appears as the value text. |
| Value position | None / Top / Center / Bottom / Left / Right | Center | Where the value text appears. |
| Animate changes | toggle | on | Smooth bar fill changes. |
2. Header
| Property | Type | Default | What it controls |
|---|---|---|---|
| Show header | toggle | off | Display a header above the bar. |
| Header text | text | empty (placeholder Label) | Header text. Only when Show header is on. |
| Alignment | Left / Center / Right | Center | Header text position. Only when Show header is on. |
3. Value
| Property | Type | Default | What it controls |
|---|---|---|---|
| Current value | slider | 0 | Initial value (clamped to Min..Max). |
| Min value | number | 0 | Lower bound. |
| Max value | number | 100 | Upper bound. |
| Unit | text | empty (placeholder %, mL, °C…) | Unit appended to the value. |
4. Appearance
| Property | Type | Default | What it controls |
|---|---|---|---|
| Show border | toggle | on | Show outer border. |
| Border width | 1–6 | 2 | Border stroke. Only when Show border is on. |
| Corner radius | 0–24 | 8 | Bar corner roundness. |
| Segment count | 3–20 | 10 | Number of segments. Only when Style is Segmented. |
| Segment spacing | 1–10 | 2 | Gap between segments. Only when Style is Segmented. |
5. Indicator
Only when Value position is Left or Right.
| Property | Type | Default | What it controls |
|---|---|---|---|
| Style | ▶ Triangle / ● Circle / | Line / ◆ Diamond / → Arrow | ▶ Triangle |
| Size | 6–20 | 12 | Pointer size. |
| Indicator color | color (optional) | theme | Pointer color. |
6. Colors · Bar
When Style is Solid or Segmented.
| Property | Type | What it controls |
|---|---|---|
| Fill | color | Filled portion. |
| Background | color | Unfilled portion. |
| Border | color | Border. |
| Text | color | Value text. |
6 bis. Colors · Gradient
When Style is Gradient.
| Property | Type | What it controls |
|---|---|---|
| Start (Bottom) | color | Gradient start (bottom). |
| End (Top) | color | Gradient end (top). |
7. Colors · Bar (Gradient companion)
When Style is Gradient — second block.
| Property | Type | What it controls |
|---|---|---|
| Background | color | Unfilled portion. |
| Border | color | Border. |
| Text | color | Value text. |
8. Thresholds
A dynamic list of value-color pairs that color zones along the bar.
For each threshold:
| Property | Type | What it controls |
|---|---|---|
| Color swatch | color picker | Zone color above this threshold. |
| Value display | read-only | Shows the value as integer and % of range. |
| Slider | range Min..Max | Adjusts the threshold value. |
Plus per-threshold action:
| Action | Type | What it does |
|---|---|---|
| Delete | button | Remove this threshold. |
Plus list-level action:
| Action | Type | What it does |
|---|---|---|
| Add threshold | button | Creates a new threshold at mid-range with a default amber color. |
States and behavior
[image] Three styles side by side — Solid 60 %, Gradient 40 %, Segmented 70 %
The bar fills from bottom to top. With Gradient style, the colors transition from start (bottom) to end (top), so the visible gradient at any fill level is anchored to the bar’s bottom.
In code
The widget mirrors what your sketch sends. To update its value:
instant.vLevel("room_temp").setValue(readTemp());
That single line is what shows up on the dashboard. Don’t put it directly in loop() — Arduino’s loop() runs thousands of times per second, which would flood the link. Use a timer to push at a sensible rate (200–1000 ms is plenty).
Available methods: .setValue(float), .setRange(float min, float max), .update(float value, float min, float max). See InstantIoT Library / Send Data to App.
Working Arduino code example
A complete sketch you can flash. The Widget ID room_temp matches the one you set on your Vertical Level in the app.
[gif] Vertical Level on the dashboard rising and falling as the ESP32 reads a temperature sensor
Direct Mode
Your phone connects directly to the ESP32’s SoftAP — no router, no server. Best for prototyping and standalone setups.
#include <InstantIoTWiFiAP.hpp>
#include <utils/InstantIoTTimer.hpp>
const char* AP_SSID = "InstantIoT-Greenhouse";
const char* AP_PASS = "12345678";
InstantIoTWiFiAP instant(AP_SSID, AP_PASS);
InstantTimer timers;
float readTemp() {
// Replace with your real sensor read (°C)
return 18.0f + (random(0, 100) / 10.0f);
}
void pushTemp() {
if (!instant.connected()) return;
instant.vLevel("room_temp").setValue(readTemp());
}
void setup() {
instant.begin();
timers.every(500, pushTemp);
}
void loop() {
instant.loop();
timers.run();
}
Server Mode
The ESP32 connects to your self-hosted InstantIoT Server over WiFi. Multiple devices, persistent state, history.
#include <InstantIoTWiFiServer.hpp>
#include <utils/InstantIoTTimer.hpp>
const char* WIFI_SSID = "YOUR_WIFI_SSID";
const char* WIFI_PASS = "YOUR_WIFI_PASSWORD";
const char* SERVER_IP = "192.168.1.42";
const uint16_t SERVER_PORT = 9001;
const char* DEVICE_TOKEN = "YOUR_DEVICE_TOKEN";
InstantIoTWiFiServer instant(SERVER_IP, SERVER_PORT, DEVICE_TOKEN);
InstantTimer timers;
float readTemp() {
// Replace with your real sensor read (°C)
return 18.0f + (random(0, 100) / 10.0f);
}
void pushTemp() {
if (!instant.connected()) return;
instant.vLevel("room_temp").setValue(readTemp());
}
void setup() {
instant.begin(WIFI_SSID, WIFI_PASS);
timers.every(500, pushTemp);
}
void loop() {
instant.loop();
timers.run();
}
The widget code is identical — only the include and constructor change.
Notes
- This is a Display — no Target Devices dropdown.
- Indicator section only appears when Value position is Left or Right (opposite of Horizontal Level, which uses Top/Bottom).
Next
→ Horizontal Level — Same widget, oriented horizontally.
→ Gauge — When the arc form reads better than a bar.
→ Bar Chart — For comparing several values side by side.