Text Input Widget
The Text Input widget sends an arbitrary string to a virtual pin when the user presses Send or hits Enter. Use it to send SSID names, display messages, AT commands, or any free-form text input.
Default size: 3 × 2 grid cells
Configuration
| Property | Type | Default | Description |
|---|---|---|---|
maxLength | number | 255 | Maximum number of characters |
placeholder | string | Enter text | Hint text shown when empty |
sendOnEnter | boolean | true | Auto-send when Enter is pressed |
| Device | device | — | The device to write to |
| Pin | V0–V255 | — | The virtual pin to write |
| Label | string | — | Widget label |
Firmware example
VWIRE_RECEIVE(V0) {
String text = param.asStr();
if (text.length() == 0) return;
// Show on OLED
display.clearDisplay();
display.setCursor(0, 0);
display.println(text);
display.display();
// Echo confirmation
Vwire.virtualSend(V0, "Shown: " + text);
}
Use cases
| Use case | What to send |
|---|---|
| OLED message | Any display string |
| Wi-Fi SSID update | SSID name |
| AT command | AT+CIFSR, AT+RESET, etc. |
| Webhook URL | Full URL string |
| Device alias | Name to store in NVS |
Security note
Input validation on device
The device receives raw string data. Always validate on firmware side before acting on the input — e.g. length limits, allowed character sets, checksums — especially for commands with side effects.