doc/help/Actions.md
Actions let you put buttons on the Serial Studio dashboard that send commands back to the connected device. Typical uses include resetting a microcontroller, toggling an output pin, asking for a sensor reading, or sending calibration sequences. Each action is configured in the Project Editor and shows up 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 you click an action button (or a timer fires), Serial Studio transmits the action's payload (the Transmit Data string followed by the configured End-of-Line Sequence) to the target device over the active connection. If Send as Binary is on, the payload is interpreted as hexadecimal bytes instead of plain text.
FF 01 A3) instead of text.RST or GET_TEMP. C-style escape sequences (\n, \r, \t, \\) are resolved before transmission.FF 01 00 A3.| Option | Bytes sent |
|---|---|
| None | Nothing appended |
New Line (\n) | 0x0A |
Carriage Return (\r) | 0x0D |
CRLF (\r\n) | 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. |
| Auto Start | Timer starts automatically when the device connects. The command repeats at the configured interval until the device disconnects. |
| Start on Trigger | Timer starts on the first click. The command repeats at the configured interval until stopped. |
| Toggle on Trigger | Each click toggles the repeating timer on or off. |
| Repeat N Times | Each click sends the command a fixed number of times, waiting the configured interval between each send. |
In projects with multiple sources (devices), the Target Device dropdown in the action properties selects which device an action transmits to, and the flow diagram in the Project Editor draws an arrow from each action to its target device. When the action fires, its payload is sent to the selected source.
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 don't set a target device, the action defaults to the first source (Device A).
When the device is connected, action buttons show up on the dashboard alongside your data widgets. Each button has:
Clicking the button sends the configured payload immediately. If a timer mode is active, the button label reflects the timer state.
Send a reset command followed by a newline:
| Property | Value |
|---|---|
| Action Title | Reset Device |
| Transmit Data | RST |
| End-of-Line Sequence | New Line (\n) |
| Send as Binary | Off |
Send a binary configuration packet on connect:
| Property | Value |
|---|---|
| Action Title | Initialize Sensor |
| Transmit Data (Hex) | AA 01 FF 00 55 |
| Send as Binary | On |
| Auto-Execute on Connect | On |
Request a sensor reading every 500 ms:
| Property | Value |
|---|---|
| Action Title | Poll Temperature |
| Transmit Data | GET_TEMP |
| End-of-Line Sequence | CRLF (\r\n) |
| Timer Mode | Auto Start |
| Interval (ms) | 500 |
Toggle an LED on or off with each click:
| Property | Value |
|---|---|
| Action Title | Toggle LED |
| Transmit Data | LED_TOGGLE |
| End-of-Line Sequence | New Line (\n) |
| Timer Mode | Off |
Symptom. The action is configured in the Project Editor but no button shows up on the dashboard.
Fix. Make sure 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 doesn't 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 can't keep up. For most polling scenarios, 500 to 2000 ms is enough.