doc/help/Actions.md
Actions let you define buttons on the Serial Studio dashboard that send commands back to the connected device. Common uses include resetting a microcontroller, toggling an output pin, requesting a sensor reading, or sending calibration sequences. Each action is configured in the Project Editor and appears automatically on the dashboard when you connect.
flowchart LR
A["Dashboard Button"] --> B["Action Triggered"]
B --> C["TX Data + EOL"]
C --> D["Target Device"]
When the user clicks an action button (or a timer fires), Serial Studio transmits the action's payload — the TX Data string followed by the configured EOL sequence — to the target device over the active connection. If Binary mode is enabled, the payload is interpreted as hexadecimal bytes instead of plain text.
FF 01 A3) rather than ASCII text.RST or GET_TEMPFF 01 00 A3| Option | Bytes sent |
|---|---|
| None | Nothing appended |
\n (LF) | 0x0A |
\r (CR) | 0x0D |
\r\n (CRLF) | 0x0D 0x0A |
Actions can repeat on a timer, which is useful for periodic polling or keep-alive commands.
| Mode | Behavior |
|---|---|
| Off | Manual trigger only (default). The button sends the command once per click. |
| AutoStart | The timer starts automatically when the device connects. The command repeats at the configured interval until the device disconnects. |
| StartOnTrigger | The timer starts on the first click. The command repeats at the configured interval until stopped. |
| ToggleOnTrigger | Each click toggles the repeating timer on or off. |
In projects with multiple sources (devices), each action can target a specific device. Use the Target Device dropdown in the action properties to select which device receives the command. The flow diagram in the Project Editor shows a dashed arrow from each action to its target device.
flowchart RL
A1["Action: Poll Sensor A"] -->|TX| D1["Device A"]
A2["Action: Poll Sensor B"] -->|TX| D2["Device B"]
A3["Action: Reset All"] -->|TX| D1
If you do not explicitly set a target device, the action defaults to the first source (Device A).
When the device is connected, action buttons appear on the dashboard alongside your data widgets. Each button shows:
Clicking a button sends the configured payload immediately. If a timer mode is active, the button label indicates the current timer state.
Send a reset command followed by a newline:
| Property | Value |
|---|---|
| Title | Reset Device |
| TX Data | RST |
| EOL | \n |
| Binary | Off |
Send a binary configuration packet on connect:
| Property | Value |
|---|---|
| Title | Initialize Sensor |
| TX Data | AA 01 FF 00 55 |
| EOL | None |
| Binary | On |
| Auto-Execute | On |
Request a sensor reading every 500 ms:
| Property | Value |
|---|---|
| Title | Poll Temperature |
| TX Data | GET_TEMP |
| EOL | \r\n |
| Timer Mode | AutoStart |
| Timer Interval | 500 |
Toggle an LED on/off with each click:
| Property | Value |
|---|---|
| Title | Toggle LED |
| TX Data | LED_TOGGLE |
| EOL | \n |
| Timer Mode | Off |
Symptom: The action is configured in the Project Editor but no button appears on the dashboard.
Fix: Ensure the device is connected. Action buttons only appear on the dashboard while a connection is active.
Symptom: The button appears and can be clicked, but the device does not respond.
Fix:
\n or \r\n).Symptom: The device is overwhelmed with commands or the serial buffer overflows.
Fix: Increase the Timer Interval. A value of 100 ms sends 10 commands per second — reduce this if your device cannot keep up. For most polling scenarios, 500–2000 ms is sufficient.