Docs
Widgets
A widget is a control on your phone bound to one pin on your board. You tap
a Button, 1 arrives on V1. Your board writes a temperature to V2, the
Gauge moves. Everything below is a variation on that.
They work. Go ahead and try them.
Direction decides your code
A widget that sends needs a PLYNX_WRITE(Vn) handler in your sketch. A
widget that displays needs your sketch to call Plynx.virtualWrite(Vn, …).
Nothing arrives by itself in either direction.
Controls: phone to board
| Widget | Sends | Use it for |
|---|---|---|
| Button | 1 or 0 | relays, lights, pumps |
| Styled Button | 1 or 0, with labels per state | controls that say what they do |
| Slider | a value in a range | brightness, speed, position |
| Vertical Slider | the same, upright | faders, levels |
| Step | a value changed by a fixed amount | setpoints, angles |
| Number Input | a number you type | exact values, durations |
| Text Input | a line of text | messages, names |
| Menu | the index of an option | modes, presets |
| Segmented Control | the index of a segment | two to four visible choices |
| RGB Picker | three channels | LED strips, colour |
| Joystick | two axes | robots, pan and tilt |
| Tilt | phone tilt | steering by motion |
| Volume | 0 to 100 | amplifiers, buzzers |
Readouts: board to phone
| Widget | Shows | Use it for |
|---|---|---|
| Gauge | one number on a dial | temperature, pressure |
| Value Display | one number as text | any reading, with a unit |
| Labeled Value | the same, name on the line | dense dashboards |
| LED | a state | running, open, alarm |
| Level Display | a filling bar | tanks, batteries |
| Vertical Level | the same, upright | tanks, silos |
| Chart | values over time | trends, history |
| LCD | two lines of text | status lines |
| Map | points on a map | trackers, fleets |
| Table | rows of name and value | logs, device lists |
| Image | a picture from a URL | snapshots, diagrams |
| Video | a camera stream | ESP32-CAM, webcams |
Both ways
| Widget | What it does |
|---|---|
| Terminal | prints logs, takes commands |
| Bridge | lets one board write pins on another |
Logic and alerts
These run on the server or in the app, and most need no code at all.
| Widget | What it does |
|---|---|
| Automation | switches a pin at a set time, or at sunrise and sunset |
| Rules | if-then rules the server watches |
| Scene | sets several pins with one tap |
| Notification | a push message to your phone |
| a message to an inbox | |
| Webhook | calls a URL when a pin changes |
| RTC | gives your board the current time |
| Tabs | splits a dashboard into pages |
What holds for every widget
- Pin type matters.
V1(virtual) is notD1(digital). A widget bound to the wrong type looks connected and does nothing. Plynx.run()lives inloop(). Without it nothing is sent or received.- Don’t flood the link. Keep it under ten values per second, and send only when a value actually changes.
- A reboot loses state. The board comes up knowing nothing. Ask for what it
needs with
Plynx.syncVirtual(Vn)insidePLYNX_CONNECTED().