Skip to content

MPF config file reference: FAST Pinball LEDs

MPF 0.57 Configuration Reference for FAST Pinball Hardware

This page is parrt of the reference material for users of the Mission Pinball Framework and FAST Pinball hardware. If you're new to MPF and FAST, read the MPF + FAST overview first. If you are a programmer writing your own software, see our Developer's Reference Guide.

Note that this guide only applies to MPF 0.57. If you're using MPF 0.56 or older, then the FAST Pinball configuration section of the Mission Pinball website has everything you need.

This guide explains how to configure MPF for LEDs connected to FAST Pinball Controllers. You can use both RGB and RGBW LEDs. There are two ways that LEDs are connected and configured:

  • LEDs connected to FAST Expansion Boards (including the ports built-in to the Neuron Controller)
  • LEDs connected to the FAST Nano Controller

We'll cover both scenarios in this guide.

LEDs connected to FAST Expansion Boards (and the Neuron Controller)

This section covers how to configure RGB and RGBW LEDs connected to FAST Expansion Boards, including the ports built-in to the Neuron Controller (since that's technically just a built-in expansion board).

LED numbering is pretty straightforward. Each LED is identified by the expansion board it's connected to, the LED port, and the LED number in the chain.

In your config, the number: setting for an LED is like this:

Expansion Board LED numbering in MPF 0.57
number: <Expansion board name> - <LED Port> - <LED position in the chain>
  • Expansion board name The name of the expansion board from the exp: section of your config.
  • LED Port The port number on the expansion board. This is the number printed on the board, starting with 1.
  • LED position in the chain The position of the LED in the chain. The first LED is 1, up through 32.

Here are some examples:

Expansion Board LED numbering in MPF 0.57
lights:
    shoot_again:
      number: playfield-1-1 #(1)!
    left_eye:
      number: topper-2-1 # (2)!
    right_eye:
      number: topper-2-2 # (3)!
  1. This LED is attached to the Expansion board you called "playfield" in the exp: section above, and this is Port 1, LED #1 in the chain.
  2. Expansion board you named "topper", LED Port 2, LED #1 in the chain.
  3. This is the next LED in the chain after the previous on, Expansion board "topper", LED Port 2.

LEDs connected to the FAST Nano Controller

There are two ways to enter numbers for RGB LEDs connected to the FAST Nano controller:

  1. Use a single integer number, from 0-255. This is the old-school way but a lot of configs use it now. These numbers start with zero, so LEDs connected to port 1 would be 0 - 63, port 2 is 64 - 127, etc.
  2. Use the new way, where it's "port", dash, "light position in the chain." The new way uses port numbers (1-4), then a dash, then the LED number in the chain (1-64).

The old way starts with 0, the new way starts with 1

Note that if you use the old way, with just a number, the counting starts with 0. e.g. number: 0 is valid. The new way does not use zeros. It's port 1-4, and then LED position in the chain 1-64. So the new way, the first LED on the first port is number: 1-1. In the new way, this is NOT valid: number: 1-0 and will give an error.

You'll need to add an rgb: entry to your connections list, with at minimum the port name (or "auto"). You can optionally add led_hz: (basically the frames per second, the default and max is 30, but you can tune this down if you want.)

Nano Controller LED numbering in MPF 0.57
# config_version=6

fast:
  net:
    [not shown]
  rgb:
    port: auto

lights:
    shoot_again:
      number: 1-1 #(1)!
    left_eye:
      number: 2-1 # (2)!
    right_eye:
      number: 2-2 # (3)!
  1. Port 1, First LED in the chain
  2. Port 2, First LED in the chain
  3. Port 3, Second LED in the chain

The various channels: and previous: configuration settings described in the MPF documentation should work fine. Also RGBW LEDs should work with the Nano.

Combining both types is ok!

If you have a Nano Controller with the expansion hat, you might have both Expansion Board and Nano Controller LEDs in your machine at the same time. This works fine! You'll need to have both an exp: and rgb: section in your FAST config.

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