SA: Report the Switches is ASCII Hex Data format¶
FAST Serial Protocol: Overview & First Steps
This documentation section is about the FAST Serial Protocol (FSP) commands, which are the low-level commands a host computer sends to a FAST board. Most FAST Pinball makers do not need to know about these details, since the pinball game framework (such as the Mission Pinball Framework) handles this communication for you.
If you're writing your own game framework, we have a series of programming guides. Also, be sure to read the overview of how FSP works and how to connect first.
This command gets the raw hardware states of all switches, returned in ASCII hex format.
The SA:
command response includes the physical state of each switch. If you configured the switch to report inverted, that only affects the /N
-N
or /L
-L
messages, not this SA:
output.
SA:<CR>
Returns¶
SA:<(Total # of switches / 8) + 1)><SwData0><SwData1>...<SwDataX><CR>
The (Total # of switches / 8) + 1)
is essentially the "number of characters of switch data will be coming". The Neuron and Retro Controllers always report 104 switches (which is a value of 0E
which is decimal 14, since 104/8 + 1 = 14.) If you want to know how many switches are physically present, you can add up all the switch values from the NN:
command.
Example:¶
>SA:
SA:OE,01F46AC100000000000000000000
N or > jump the next page, P or < for previous, search with S or ?