Warning

This is the dev documentation for an unreleased version of MPF!

This is the documentation for MPF 0.53+, which is the “dev” (next) release of MPF that is a work-in-progress. Unless you’re specifically looking for this version, you probably want to use the version of documentation called “latest” which is for the latest released version of MPF. That documentation is at docs.missionpinball.org/en/latest.

Spinners

Related Config File Sections
switches:

Spinners are rotating metal plates which close a switch once per rotation.

../../_images/spinner.jpg

In MPF spinners are configured just like normal switches:

switches:
   s_my_spinner:
      number: 42     # number depends on your platform

It is very common to count the rotations of your spinner per player. You can eiher use a player variable or a counter for that. This is an example:

switches:
   s_my_spinner:
      number: 42 # number depends on your platform

# in your base mode add 1 for every rotation to a player variable which you can use in slides
variable_player:
   s_my_spinner_active:
      spinner_rotations: 1

# in a game mode the player needs to spin the spinner 10 times
counters:
   spinner_rotations:
      count_events: s_my_spinner_active
      count_complete_value: 10
      events_when_complete: mode_finished