-
Notifications
You must be signed in to change notification settings - Fork 1
Serial Commands
Serial commands are string templates that Amidala sends out the primary serial port (GPIO43/44) to downstream devices like the WCB. You can have up to 500 serial strings (the limit can be increased if needed).
On the Serial Commands page, click Add to create a new entry. Each entry has:
| Field | Description |
|---|---|
| Description | A friendly name for your own reference (shown in button mapping dropdowns). Max 32 characters. |
| String | The actual bytes to send. Max 64 characters. |
Once saved, the command is available to assign to any button or gesture action.
The delimiter character (configured in General Settings) lets you encode multiple lines in a single string field.
When Amidala sends a serial string, every occurrence of the delimiter is replaced with the configured end-of-line sequence (LF, CR, or CRLF). This lets you send multi-line commands to devices that expect line breaks, without needing separate entries for each line.
Example: If your delimiter is : and EOL is LF, the string A:B:C is sent as:
A
B
C
Each segment gets its own terminator, and a final terminator is appended at the end.
The End of Line setting (General Settings) controls what's sent as the line terminator:
| Option | Bytes Sent |
|---|---|
| LF |
\n (0x0A) |
| CR |
\r (0x0D) |
| CRLF | \r\n |
Match this to whatever your receiving device expects. Most R2 accessories (WCB, Marcduino, etc.) use \r or \r\n.
| Field | Limit |
|---|---|
| Description | 32 characters |
| String | 64 characters |
| Total commands | 500 (configurable in firmware) |