Example #1
0
On the Eurgle winch 500/180 gave 7.5 rotations, 500/360 gave about 2.25
500/500 about .5

'''
from Tkinter import *
from Adafruit_PWM_Servo_Driver import PWM
import time

pwm = PWM(0x40)
pwm.setPWMFreq(50)


GPIO.setmode(GPIO.BCM)
GPIO.setup(17, GPIO.OUT)
pwm = GPIO.PWM(17, 10)
pwm.start(50)




class App:
    def __init__(self, master):
        frame = Frame(master)
        frame.pack()
        scale = Scale(frame, from_=0, to=180,
              orient=HORIZONTAL, length=500, resolution=0.1, command=self.updateh)
        scale.grid(row=0)
        scale.set(90)
        
        scale = Scale(frame, from_=0, to=100, orient=VERTICAL, length=500, command=self.updates)
		scale.grid(column=0)