Ejemplo n.º 1
0
#!/usr/bin/python

# RubpyxRobot Close Fingers Script
# By: Ryan Brazeal (and the I2C Club)
# Date: Started - Circa 2017

from driver import PWM
import os
import time

# Initialise the PWM device using the default address
pwm = PWM(0x40)
# Set frequency to 60 Hz
pwm.setPWMFreq(60)

#Hardware Definition Parameters
whiteClamp = 0
whiteTwist = 1
blueClamp = 2
blueTwist = 3
yellowClamp = 4
yellowTwist = 5
redClamp = 6
redTwist = 7

#Calibration Parameters
whiteClampClosed = 0
whiteClampOpen = 0
whiteTwistNeutral = 0
whiteTwistCCW = 0
whiteTwistCW = 0
Ejemplo n.º 2
0
#!/usr/bin/python

from driver import PWM

# Initialise the PWM device using the default address
pwm = PWM(0x40)
pwm.setPWMFreq(60)  # Set frequency to 60 Hz
pwm.softwareReset()