def __init__(self, gpio): GPIO.setmode(GPIO.BCM) GPIO.setup(gpio, GPIO.OUT) self.pwm = GPIO.PWM(gpio, 1)