write me a basic config file for mission pinball framework, should include the settings for FAST hardware and the entire lower third. i.e. flippers, trought, slingshots etc.
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Okay, here's a basic MPF (Mission Pinball Framework) config file focusing on the FAST hardware setup and the core lower third components (flippers, trough, slingshots).
This config assumes:
You have a FAST PDB (Pinball Driver Board) connected via USB.
You are using standard single-wound flipper coils (MPF handles the hold automatically if configured correctly, or you can add a hold_coil for dual-wound).
Your switches are normally open (NO), which is common.
yaml
# mpf_mc.yaml (Media Controller configuration - typically in a separate file, but included for completeness)
# You'll likely need this if you want any screen/lights/sounds.
# If you only want to test hardware, you might not run mpf_mc, just mpf.
# This config primarily focuses on the machine side.
#
# --- Begin mpf_mc.yaml content (if you use it) ---
# display_controller:
# window:
# - light_score_display
# displays:
# light_score_display:
# width: 800
# height: 600
# default_type: dmd
# source_display: dmd
# slide_player:
# init_done:
# - type: text
# text: READY!
# color: white
# font_size: 40
# --- End mpf_mc.yaml content ---
# machine.yaml (Main MPF machine configuration)
# 1. MPF General Machine Settings
machine:
## Replace with your machine's name
# Example: "My First Pinball Machine"
# This name is used in various logging and debug outputs.
name: My Basic Pinball
# 2. Hardware Platform Configuration
# This tells MPF which hardware platform you are using (e.g., FAST, P-ROC, OPP, Spike)
hardware:
platform: fast
driver_boards: fast # For FAST, this specifies the type of driver boards
# IMPORTANT: Change this to the actual serial port for your FAST controller.
# On Windows, it's typically COMx (e.g., COM3, COM4)
# On Linux/macOS, it's typically /dev/ttyUSBx or /dev/tty.usbmodemxyz
# You can find this using `mpf hardware scan` or your OS device manager.
serial_port: COM3 # Example for Windows, change for your OS
# 3. Coils (Drivers) - The things that move and fire
# FAST coils are typically addressed as D<board_address>-<driver_number>
# For example, D1-1 is Driver 1 on PDB board 1.
# IMPORTANT: These numbers must match how your coils are wired to your FAST board.
coils:
# Flipper Coils (Main winding for single-wound or power winding for dual-wound)
c_flipper_left_main:
number: D1-1 # Example: Driver 1 on the first PDB
pulse_ms: 20 # How long the coil fires in milliseconds (adjust as needed, 20-30ms common for flippers)
c_flipper_right_main:
number: D1-2 # Example: Driver 2 on the first PDB
pulse_ms: 20
# Trough Eject Coil
c_trough_eject:
number: D1-3 # Example: Driver 3 on the first PDB
pulse_ms: 30 # Slightly longer pulse often good for ejects
# Slingshot Coils
c_slingshot_left:
number: D1-4 # Example: Driver 4 on the first PDB
pulse_ms: 25 # Slingshots often need a quick, sharp pulse
# When this coil receives the 'fire_slingshot_left' event, it will pulse.
play_events: fire_slingshot_left
c_slingshot_right:
number: D1-5 # Example: Driver 5 on the first PDB
pulse_ms: 25
play_events: fire_slingshot_right
# 4. Switches - The things that detect events
# FAST switches are typically addressed as S<board_address>-<switch_number>
# For example, S1-1 is Switch 1 on the first PDB.
# IMPORTANT: These numbers must match how your switches are wired to your FAST board.
switches:
# Flipper Switches (buttons or leaf switches under the flipper bats)
s_flipper_left:
number: S1-1 # Example: Switch 1 on the first PDB
type: NO # Normally Open (closed when pressed)
tags: flipper_active # Standard tag for flipper bat switches
s_flipper_right:
number: S1-2 # Example: Switch 2 on the first PDB
type: NO
tags: flipper_active
# Trough Ball Switches
# Each switch detects a ball in a specific position in the trough.
# Adjust count based on your trough design (e.g., 5 for a standard 5-ball trough).
s_trough_1:
number: S1-3
type: NO
tags: trough_ball # Standard tag for trough ball switches
s_trough_2:
number: S1-4
type: NO
tags: trough_ball
s_trough_3:
number: S1-5
type: NO
tags: trough_ball
s_trough_4:
number: S1-6
type: NO
tags: trough_ball
s_trough_5:
number: S1-7
type: NO
tags: trough_ball
# Shooter Lane Switch (detects ball ready to be launched)
s_shooter_lane:
number: S1-8
type: NO
tags: home_ball # Indicates a ball ready to enter the playfield
# Slingshot Switches
s_slingshot_left:
number: S1-9
type: NO
# When this switch is hit (becomes active), it fires the 'fire_slingshot_left' event.
# This event is then picked up by the c_slingshot_left coil to pulse.
events_when_active: fire_slingshot_left
s_slingshot_right:
number: S1-10
type: NO
events_when_active: fire_slingshot_right
# 5. Flippers - Logic that combines coils and switches
flippers:
flipper_left:
main_coil: c_flipper_left_main
switch: s_flipper_left
# type: enabled - This is the default for a standard flipper where the player holds the button.
# For EOS switches and dual-wound coils, you'd add:
# eos_switch: s_flipper_left_eos
# hold_coil: c_flipper_left_hold
flipper_right:
main_coil: c_flipper_right_main
switch: s_flipper_right
# 6. Ball Devices - How balls move around the machine
ball_devices:
# The trough is a ball device that holds balls and ejects them.
trough:
ball_switches:
- s_trough_1
- s_trough_2
- s_trough_3
- s_trough_4
- s_trough_5
eject_coil: c_trough_eject
eject_targets: playfield # Where does the trough eject balls to? The playfield.
eject_coil_pulse_ms: 50 # Pulse for the trough eject (can be different from coil's default)
# The trough will hold ejecting the ball until the shooter lane switch is hit.
# This ensures the ball actually made it out of the trough.
hold_eject_until_switch_hits: s_shooter_lane
# Tags are used by MPF to identify this as the default place for balls to start a game.
tags: default_ball_device
# How many times to try ejecting if a switch isn't hit
entrance_count_eject_attempts: 3
# Delay before counting balls or attempting ejects
entrance_count_delay: 500ms
# The playfield is a special ball device that represents the main playing area.
# Balls enter here from devices like the trough and leave to drains.
playfield:
# auto_plunger_launch will automatically "plunge" balls into play when they enter the playfield.
# This is useful for testing without needing to manually plunge.
auto_plunger_launch: true
# Tags are important for MPF to know this is the main playing area.
tags: default_light_ball_device
# How balls drain from the playfield. In a real game, this usually goes back to the trough.
# Here, we assume the trough is the drain destination.
drain_and_recirculate_from_device: trough
# 7. Bonus: Basic Lights (e.g., start button, launch button)
# FAST lights use the same D<board_address>-<driver_number> addressing as coils.
# You can set a default brightness or use a tag like 'rgb' for RGB LEDs.
lights:
l_start_button:
number: D1-11 # Example: Driver 11 on the first PDB
tags: start_button_light # Standard tag
l_launch_button:
number: D1-12 # Example: Driver 12 on the first PDB
tags: launch_button_light
# 8. Bonus: Basic Game Settings
# This isn't strictly "lower third" but essential for a functional game.
game:
# Number of balls per game
balls_per_game: 3
# Maximum simultaneous players
max_players: 4
# 9. Autoplay (for testing without a player)
# Set to 'true' to have MPF automatically play a game (launch balls, hit switches randomly)
# Useful for verifying hardware and basic game flow without user interaction.
# DO NOT leave this on for actual gameplay.
#
# If you enable this, you might also want to uncomment the mpf_mc.yaml section above
# to see some visual output.
#
# event_player:
# init_phase_1: game_start
# ball_ending: game_add_ball
# ball_draining: game_add_ball
# ball_active: ball_device_trough_eject # To keep launching balls
#
# logic_blocks:
# slingshot_fire:
# type: random
# events:
# - s_slingshot_left_active
# - s_slingshot_right_active
# delay: 1s # Fire slingshots roughly every second
# tags: autoplay_event
How to Use This Config:
Save the file: Save this as machine.yaml in your MPF machine folder (e.g., C:\mpf-examples\my_first_machine\config\machine.yaml).
Adjust serial_port:THIS IS CRITICAL! Change COM3 to the actual serial port your FAST controller is connected to. Use mpf hardware scan in your command line in the machine's root directory to find it.
Adjust number values: The D<board_address>-<driver_number> and S<board_address>-<switch_number> values for coils and switches MUST match how your actual hardware is wired to your FAST boards. If you have multiple PDBs, the board_address will change (e.g., D2-1 for a coil on the second PDB).
Navigate to your machine's root folder (the one containing your config folder).
Run mpf both (this will run both the core MPF and the Media Controller if you uncommented mpf_mc.yaml parts).
If you only want to test hardware without graphics/sound, just run mpf --config config or mpf.
Important Notes:
Numbering: The numbers (D1-1, S1-1, etc.) are arbitrary examples here. You must wire your coils and switches to the corresponding numbers on your FAST boards and then update this config to match.
Coil Pulse Times (pulse_ms): These are starting points. You will need to experiment with your actual coils to find the optimal pulse times for proper firing power without overheating or damaging components.
EOS (End-of-Stroke) Switches: For more advanced flipper control (especially with dual-wound flipper coils), you would add eos_switch: s_flipper_left_eos and a hold_coil: c_flipper_left_hold to the flipper definitions. For a "basic" setup, this is omitted.
LEDs (Lights): FAST LEDs (like the ones on the PDB itself or LED matrix boards) also use D<board_address>-<driver_number> addresses. For RGB LEDs, you'd define them as a single light and MPF handles the R, G, B channels automatically if the hardware is properly set up.
Documentation: This is a very basic starting point. MPF has extensive and excellent documentation. As you progress, refer to it for more advanced features: https://docs.missionpinball.org/en/latest/
This configuration should give you a solid foundation to get your FAST-powered lower third up and running in MPF!