motor (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.

Note that there are multiple machine config examples here. They’re just included to show different options. You wouldn’t actually use more than one.

#config_version=5

switches:
    s_multiposition_motor_1:
        number:
    s_multiposition_motor_2:
        number:
    s_multiposition_motor_3:
        number:
    s_multiposition_motor_4:
        number:

digital_outputs:
    c_multiposition_motor_left:
        number:
        type: driver
    c_multiposition_motor_right:
        number:
        type: driver

motors:
    multiposition_motor2:
        debug: True
        motor_left_output: c_multiposition_motor_left
        motor_right_output: c_multiposition_motor_right
        position_switches:  !!omap
            - position1: s_multiposition_motor_1
            - position2: s_multiposition_motor_2
            - position3: s_multiposition_motor_3
            - position4: s_multiposition_motor_4
        reset_position: position2
        go_to_position:
            goto_position1: position1
            goto_position2: position2
            goto_position3: position3
            goto_position4: position4
#config_version=5

switches:
    s_multiposition_motor_1:
        number:
    s_multiposition_motor_2:
        number:
    s_multiposition_motor_3:
        number:
    s_multiposition_motor_4:
        number:

digital_outputs:
    c_multiposition_motor_left:
        number:
        type: driver
    c_multiposition_motor_right:
        number:
        type: driver

motors:
    multiposition_motor:
        debug: True
        motor_left_output: c_multiposition_motor_left
        motor_right_output: c_multiposition_motor_right
        position_switches:  !!omap
            - position1: s_multiposition_motor_1
            - position2: s_multiposition_motor_2
            - position3: s_multiposition_motor_3
            - position4: s_multiposition_motor_4
        reset_position: position2
        go_to_position:
            goto_position1: position1
            goto_position2: position2
            goto_position3: position3
            goto_position4: position4

virtual_platform_start_active_switches: s_multiposition_motor_4
#config_version=5

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:
        debug: True
        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
#config_version=5

switches:
    s_position_up:
        number:
    s_position_down:
        number:

digital_outputs:
    c_motor_run:
        number:
        type: driver

motors:
    motorized_drop_target_bank:
        debug: True
        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
            go_down2: down
#config_version=5

switches:
    s_multiposition_motor_1:
        number:
    s_multiposition_motor_2:
        number:
    s_multiposition_motor_3:
        number:
    s_multiposition_motor_4:
        number:

digital_outputs:
    c_multiposition_motor_left:
        number:
        type: driver
    c_multiposition_motor_right:
        number:
        type: driver

motors:
    multiposition_motor:
        debug: True
        motor_left_output: c_multiposition_motor_left
        motor_right_output: c_multiposition_motor_right
        position_switches:  !!omap
            - position1: s_multiposition_motor_1
            - position2: s_multiposition_motor_2
            - position3: s_multiposition_motor_3
            - position4: s_multiposition_motor_4
        reset_position: position4
        go_to_position:
            goto_position1: position1
            goto_position2: position2
            goto_position3: position3
            goto_position4: position4