Arduino firmware for receiving TeleCortex messages which communicate LED data via GCode-like serial commands
Based on GCode, with a sprinkling of ethernet.
Each command is a list of fields that are separated by whitespace. A field can be interpreted as a command, parameter, or for any other special purpose. It consists of one letter directly followed by a string of non-whitespace, printable characters.
N | Sequence Number (two ascii hex bytes which wrap around at 0xFF) |
P | Command - Probing / querying commands (no payload required) |
M | Command - Setting commands (may require payload) |
Q | Parameter - Panel number |
S | Parameter - Arbitrary integer parameter |
V | Parameter - Base 64 encoded payload |
* | Checksum (two ascii hex bytes representing the XOR of each character in the message before the checksum) |
Server can respond with a status followed by an optional sequence number.
Status can be
-
"OK {N}" = command N completed succesfully
-
"RS {N}" = resend from command N
-
E{error number} = command failed, Error Codes section for details
-
"IDLE" = command buffer has been empty for a while
The error response has an optional parameter, V which is sometimes used in debugging
E001 | Warning / recoverable error. |
E002 | Malloc Error Board ran out of memory (usually too many pixels) |
E003 | EEPROM Error Bad EEPROM Writing to disabled EEPROM |
E005 | Invalid Panel Config Panels not defined correctly in setup() |
E010 | Invalid Line Number Line numbers not contiguous |
E011 | Invalid Command Command Does not exist |
E012 | Invalid Panel number Panel number (Q Parameter) could be too big Q parameter holds panel ID |
E013 | Invalid S Parameter Pixel offset bigger than panel |
E014 | Invalid payload Payload (V Parameter) could be too long for buffer Payload may not have all Base64 characters Payload may be empty V parameter holds length of payload |
E019 | Invalid Command Checksum |
Needed so that chunks of GCode can be replayed
Parameters:
- N = New linenum
Raises: None
Not Implemented
Settings will be read on the next startup or M501.
Not Implemented
Or, undo changes.
Not Implemented
as set in Configurations.h. (Follow with M500 to reset the EEPROM too.)
Not Implemented
Not the settings stored in EEPROM.
Parameters:
-
S = Offset
-
V = Code (null terminated)
Raises: E013
Sends a hexdump of EEPROM Code Section over serial
Causes server to respond with it’s unique Identifier.
Parameters: None,
Returns:
- S = UID (8 byte hex)
Notes: Arduino can’t see FTDI serial number, must be set in EEPROM
Causes the server to respond with the number of panels it thinks it has
Parameters: None
Raises: None
deprecated?
Sets the server’s UID in EEPROM
Parameters:
- S = UID (8 byte hex)
Get the panel count in EEPROM
Causes server to write panel frame to framebuffer in RBG format
Parameters:
-
Q = Panel number (int)
-
V = Panel payload (base 64 encoded)
-
S = Pixel offset
Raises: E012, E013
Causes server to write panel frame to framebuffer in HSV format
Parameters:
-
Q = Panel number (int)
-
V = Panel payload (base 64 encoded)
-
S = Pixel offset
Raises: E012, E013
Causes the server to write a single RGB pixel from the base64 encoded payload to the entire panel.
Parameters:
-
Q = Panel number (int)
-
V = Panel payload (base 64 encoded)
Causes the server to write a single HSV pixel from the base64 encoded payload to the entire panel.
Parameters:
-
Q = Panel number (int)
-
V = Panel payload (base 64 encoded)
Server responds with RGB dump of panel
deprecated?
Server responds with HSV dump of panel
Calls the LED library to display the frame buffers on the LED matrix
Not Implemented
Calls the LED library to display the frame buffers on the LED matrix
Parameters:
- Q = Panel number (int)