Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(10)  |  Call(6)  |  Derive(0)  |  Import(4)

src/a/d/Adafruit-Raspberry-Pi-Python-Code-HEAD/Adafruit_PWM_Servo_Driver/Servo_Example.py   Adafruit-Raspberry-Pi-Python-Code(Download)
#!/usr/bin/python
 
from Adafruit_PWM_Servo_Driver import PWM
import time
 
# Initialise the PWM device using the default address
# bmp = PWM(0x40, debug=True)
pwm = PWM(0x40, debug=True)
 
servoMin = 150  # Min pulse length out of 4096

src/f/i/FishPi-POCV---Command---Control-HEAD/fishpi/vehicle/drive_controller.py   FishPi-POCV---Command---Control(Download)
        self.servo_channel = servo_channel
        # Initialise the PWM device
        from Adafruit_PWM_Servo_Driver import PWM
        # self._pwm = PWM(i2c_addr, i2c_bus=int(hw_interface), debug=debug)
        self._pwm = PWM(i2c_addr, debug=debug)

src/p/i/pi-catlaser-HEAD/servos.py   pi-catlaser(Download)
from Adafruit_PWM_Servo_Driver import PWM
 
class Servos(object):
	def __init__(self, i2cAddress, xAxisChannel, yAxisChannel, pwmFreqHz):
		self.pwm = PWM(i2cAddress, debug=True)

src/l/i/lightingPi-HEAD/lightingPi.py   lightingPi(Download)
import liblo
from ola.ClientWrapper import ClientWrapper
from Adafruit_PWM_Servo_Driver import PWM
 
PIXEL_SIZE = 3
        self.servo_min = 103  # Min pulse length out of 4096 = 20mS
        self.servo_max = 500  # Max pulse length out of 4096
        self.pwm = PWM(0x40, debug=True)
        self.pwm.setPWMFreq(50) # Set frequency to 60 Hz
    def __str__(self):

src/r/g/RGB_LED_Driver-HEAD/RGB_Driver.py   RGB_LED_Driver(Download)
    def setup_pwm(freq=200):
        pwm = Adafruit_PWM_Servo_Driver.PWM()
        pwm.setPWMFreq(freq)
        return pwm
 

src/d/a/DampedServo-HEAD/damped_servo.py   DampedServo(Download)
        self.start_stop = (0, 0)
 
        self.pwm = Adafruit_PWM_Servo_Driver.PWM()
 
        freq = 1000. / self.period  # Hz