SL: Configure a switch¶
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.
SL: command is used to configure a switch, which includes debounce times and how switch changes are reported to the host computer.
Nano Controllers use
The FAST Nano Controller uses the letter
N for switch & driver-related commands instead of
L. So everything here applies to the Nano too, except the commands are
Any switch ID number, in hex.
0Do not report any switch state changes to the host computer.
2Report inverted, for "normally closed" (NC) or opto switches.
Time to debounce switch close in ms. Default 2 ms (
02 hex). 256 ms max (range
Time to debounce switch open in mS. Default 20 ms (
14 hex). 256 ms max (range
0x02 to report normal, debounce close time is 32 ms (20 hex), Debounce open time is 16 ms (10 hex).
Reading current switch configurations¶
There are several ways to get the current configuration of a switch. The easiest is to use the
SL: command with the switch number and no other parameters. This will return the current configuration of the switch in the same format as the original
SL: command which was used to configure it. For example:
>>>> SL:1 SL:01,01,03,04
If you want to get the configuration of all switches at once, you can use the
SL:L command. In the example below, the first line of the response
SL:68 indicates that there are 104 switches configured. (This is also hex.) The next 104 lines are the configuration of each switch, in the same format as the original
Note that the Neuron can be configured for up to 104 (68 hex) switches, which is why this list will have 104 entries regardless of how many physical I/O boards are in the loop.
SL:68 SL:00,02,01,02 SL:01,01,03,04 SL:02,01,02,14 SL:03,01,02,14 SL:04,01,02,14 SL:05,01,02,14 SL:06,01,02,14 SL:07,01,02,14 SL:08,01,02,14 SL:09,01,02,14 SL:0A,01,02,14 SL:0B,01,02,14 SL:0C,01,02,14 SL:0D,01,02,14 SL:0E,01,02,14 SL:0F,01,02,14 SL:10,01,02,14 SL:11,01,02,14 ... the rest are removed for brevity, you get the idea ...
CS: command is a human-readable command you can use to see the configuration of all the switches. So if you're using a serial terminal, use
CS:, and if you're writing software, use
Documentation Feedback? Requests? Confused?
Hi! I'm Brian, and I'm responsible for the documentation at FAST Pinball. If you have any feedback, requests, corrections, ideas, or any other thoughts about the docs, please let me know!
You can email me at email@example.com. I maintain this site in my spare time, so there might be a week or so delay if you email me.
If you have a more pressing need, reach out to us via Slack, or email Aaron Davis.
N or > jump the next page, P or < for previous, search with S or ?