def __init__(self, pwm_num):
        # Get and store logger object
        self.logger = lib.get_logger()

        # Store ID number of servo
        self.pwm_num = pwm_num

        # Load config
        config = lib.get_config("bot/config.yaml")

        if config["test_mode"]["servo"]:
            # Get dir of simulated hardware files from config
            test_dir = config["test_pwm_base_dir"]

            # Build PWM object for BBB interaction, provide test dir
            self.pwm = pwm_mod.PWM(self.pwm_num, test_dir)
        else:
            # Build PWM object for BBB interaction
            self.pwm = pwm_mod.PWM(self.pwm_num)

        # Set servo to middle position
        self.pwm.duty = 1500000
        self.logger.debug("Setup {}".format(self))
Setup logger and PWM interface.
dataset/ETHPy150Open IEEERobotics/bot/bot/hardware/servo.py/Servo.__init__