import RPi.GPIO as gpio

class servo:
    def __init__(self, puerto):
        gpio.setmode(gpio.BOARD)
        gpio.setup(puerto, gpio.OUT)
        self.motor = gpio.PWM(puerto, 50)
        self.motor.start(self.dutty(0))

    def dutty(self, angle):
        dmin = 2.5
        dmax = 12.5
        return ((angle * (dmax - dmin)) / 180) + dmin

    def setAngle(self, angle):
        self.motor.ChangeDutyCycle(self.dutty(angle))

973bcb55a8ed41d1bf8b60f33f73809c22fb6c7d
<mask token>


class servo:
    <mask token>
    <mask token>

    def setAngle(self, angle):
        self.motor.ChangeDutyCycle(self.dutty(angle))

<mask token>


class servo:

    def __init__(self, puerto):
        gpio.setmode(gpio.BOARD)
        gpio.setup(puerto, gpio.OUT)
        self.motor = gpio.PWM(puerto, 50)
        self.motor.start(self.dutty(0))
    <mask token>

    def setAngle(self, angle):
        self.motor.ChangeDutyCycle(self.dutty(angle))

<mask token>


class servo:

    def __init__(self, puerto):
        gpio.setmode(gpio.BOARD)
        gpio.setup(puerto, gpio.OUT)
        self.motor = gpio.PWM(puerto, 50)
        self.motor.start(self.dutty(0))

    def dutty(self, angle):
        dmin = 2.5
        dmax = 12.5
        return angle * (dmax - dmin) / 180 + dmin

    def setAngle(self, angle):
        self.motor.ChangeDutyCycle(self.dutty(angle))

import RPi.GPIO as gpio


class servo:

    def __init__(self, puerto):
        gpio.setmode(gpio.BOARD)
        gpio.setup(puerto, gpio.OUT)
        self.motor = gpio.PWM(puerto, 50)
        self.motor.start(self.dutty(0))

    def dutty(self, angle):
        dmin = 2.5
        dmax = 12.5
        return angle * (dmax - dmin) / 180 + dmin

    def setAngle(self, angle):
        self.motor.ChangeDutyCycle(self.dutty(angle))

import RPi.GPIO as gpio

class servo:
    def __init__(self, puerto):
        gpio.setmode(gpio.BOARD)
        gpio.setup(puerto, gpio.OUT)
        self.motor = gpio.PWM(puerto, 50)
        self.motor.start(self.dutty(0))

    def dutty(self, angle):
        dmin = 2.5
        dmax = 12.5
        return ((angle * (dmax - dmin)) / 180) + dmin

    def setAngle(self, angle):
        self.motor.ChangeDutyCycle(self.dutty(angle))
