p3_roc (example config files)

Machine config examples

Here are some example machine-wide config files that show real-world examples of how these configs are used.

#config_version=5

hardware:
    driverboards: pdb
    platform: p3_roc
    servo_controllers: i2c_servo_controller

p_roc:
    debug: true

switches:
    s_test_000:
        number: A0-B0-0
    s_test_001:
        number: 0/0/3
    s_test:
        number: A1-B0-7
    s_test_no_debounce:
        number: A1-B1-0
        debounce: quick
    s_slingshot_test:
        number: A2-B1-0
    s_test_nc:
        number: A2-B1-1
        type: 'NC'
    s_flipper:
        number: 1
    s_flipper_eos:
        number: 2

coils:
    c_test:
        number: A1-B1-2
        default_pulse_ms: 23
    c_test_allow_enable:
        number: A1-B1-3
        default_pulse_ms: 23
        default_hold_power: 1.0
    c_slingshot_test:
        number: A0-B1-0
    c_coil_pwm_test:
        number: A0-B1-1
        default_hold_power: 0.2
    c_flipper_main:
        number: A0-B0-1
        default_pulse_ms: 10
        default_hold_power: 0.375
    c_flipper_hold:
        number: A0-B0-2
        default_hold_power: 0.125
    test_gi:
        number: A2-B0-3
        default_hold_power: 1.0
        default_pulse_ms: 0

autofire_coils:
    ac_slingshot_test:
        coil: c_slingshot_test
        switch: s_slingshot_test
    ac_switch_nc_test:
        coil: c_coil_pwm_test
        switch: s_test_nc

servo_controllers:
    address: 0x40

servos:
    servo1:
        number: 3

accelerometers:
    p3_roc_accelerometer:
        platform_settings:
          number: 1

flippers:
    f_test_single:
        debug: true
        main_coil_overwrite:
            pulse_ms: 11
        main_coil: c_flipper_main
        activation_switch: s_flipper

    f_test_hold:
        debug: true
        main_coil: c_flipper_main
        hold_coil: c_flipper_hold
        activation_switch: s_flipper

    f_test_hold_eos:
        debug: true
        main_coil: c_flipper_main
        hold_coil: c_flipper_hold
        activation_switch: s_flipper
        eos_switch: s_flipper_eos
        use_eos: true

lights:
  test_pdb_light:
    number: C-A2-B0-0:R-A2-B1-0
    subtype: matrix
  test_gi:
    platform: drivers
    number: test_gi
  test_led:
    number: 2-1-2-3
  test_led_inverted:
    number: 2-4-5-6
    platform_settings:
      polarity: True
    subtype: led