Skip to content

-L: (-N:) Received Switch Closed Message

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.

The -L: message (and its related message, /L:) is sent to the host computer whenever a switch changes from open to closed. (Get it? The - is closed and the / is open, like a schematic symbol.)

Nano Controllers use N instead

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 -N: /N: SN: DN: QN:.

Note that these messages only come in for switches that you've configured to notify you with the SL command. Also notes that if these messages are "backwards" (saying the switch is open when it's really closed and vice-versa), you can configure the switch to invert the settings with the SL: command also. (This is needed for optos, for example.)

The actual incoming messages will contain the switch number (in hex), followed by a carriage return. So if you connect your serial terminal and then start hitting switches, you'll see something like this:

-L:00
/L:00
-L:00
/L:00
-L:01
/L:01
-L:0F
/L:0F

These messages are just "point in time" status changes. If you want to query the FAST controller to get the status of all the switches, use CA:, SA:, or SD:. Typically you use one of those commands when your game code is booting up to get the current state of all the switches, and then just watch for changes after that.

N or > jump the next page, P or < for previous, search with S or ?