Skip to content

Motors

Related Config File Sections:

Hardware

TODO: Add a picture of a kickback

Help us to write it

Config

In this example we configure a motorized drop target bank which can move up and down with two position switches.

switches:
  s_position_up:
    number:
  s_position_down:
    number:

digital_outputs:
  c_motor_run:
    number:
    type: driver

motors:
  motorized_drop_target_bank:
    motor_left_output: c_motor_run
    position_switches: !!omap
      - up: s_position_up
      - down: s_position_down
    reset_position: down
    go_to_position:
      go_up: up
      go_down: down

The motor can run continuously and drives a camshaft which moves the bank up and down. MPF will figure the position using two position switches s_position_up and s_position_down. To enable the motor we use a digitial_output c_motor_run which maps to a driver. On reset the bank moves down and can afterwards be commanded using the events go_up and go_down.

The following is an example to drive the slimer in Stern Ghostbusters:

switches:
  s_slimer_home:
    number: 8-1
  s_slimer_away:
    number: 8-2

digital_outputs:
  c_slimer_motor_forward:
    number: 8-3
    type: light
  c_slimer_motor_backward:
    number: 8-4
    type: light

motors:
  ghostbusters_slimer:
    motor_left_output: c_slimer_motor_forward
    motor_right_output: c_slimer_motor_backward
    position_switches: !!omap
      - home: s_slimer_home
      - away: s_slimer_away
    reset_position: home
    go_to_position:
      slimer_home: home
      slimer_away: away

The slimer motor can move in two directions using two digital_outputs c_slimer_motor_forward and c_slimer_motor_backward which map to lights in Spike. The switches s_slimer_home and s_slimer_away are used by to determine the current position. To command the slimer use the events slimer_home or slimer_away.


Something missing or wrong? You can fix it!

This website is edited by people like you! Is something wrong or missing? Is something out of date, or can you explain it better?

Please help us! You can fix it yourself and be an official "open source" contributor!

It's easy! See our Beginner's guide to editing the docs.

Page navigation via the keyboard: < >

You can navigate this site via the keyboard. There are two modes:

General navigation, when search is not focused:

  • F , S , / : open search dialog
  • P , , : go to previous page
  • N , . : go to next page

While using the search function:

  • Down , Up : select next / previous result
  • Esc , Tab : close search
  • Enter : go to highlighted page in the results