Skip to content

servo_controllers:

This is a config file reference. Click for instructions.

This page is reference material which explains every setting and option for this section of an MPF yaml config file. See the instructions for config files for formatting and other details. See our guide to config file examples for more examples of real configs in action.

Valid in
machine config files YES ✅
mode config files NO 🚫

The servo_controllers: section of your config is where you configure PCA9685/PCA9635-based I2C servo controllers. See I2C Servo Controllers for details.

I2C Address

When you configure an I2C servo controller you have to address it on the I2C bus. The default of the chip is 0x40 which is 64 in decimal. There might be some prefix depending on your I2C interface.

Optional settings

The following sections are optional in the servo_controllers: section of your config. (If you don't include them, the default will be used).

console_log:

Single value, type: one of the following options: none, basic, full. Default: none

Log level for the console log for this platform.

debug:

Single value, type: boolean (true/false). Default: false

Set this to true to see more debug output.

file_log:

Single value, type: one of the following options: none, basic, full. Default: basic

Log level for the file log for this platform.

platform:

Single value, type: string. Defaults to empty.

Name of the platform this servo controller is connected to. The default value of None means the default hardware platform will be used. You only need to change this if you have multiple different hardware platforms in use and this coil is not connected to the default platform.

See the Mixing-and-Matching hardware platforms guide for details.

servo_max:

Single value, type: integer. Default: 600

The controller is driving the servo using PWM. servo_max defines thes the upper PWM limit. It will use a duty cycle of value/4096 at 50Hz.

servo_min:

Single value, type: integer. Default: 150

The controller is driving the servo using PWM. servo_min defines thes the lower PWM limit. It will use a duty cycle of value/4096 at 50Hz.


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