diff --git a/thread_dd.py b/thread_dd.py new file mode 100644 index 0000000..00e1d53 --- /dev/null +++ b/thread_dd.py @@ -0,0 +1,58 @@ +from threading import Thread +import time +from RPi import GPIO + +class DD(Thread): + + #Constructeur + def __init__(self, pin, t_notes, t_tps): + Thread.__init__(self); + self.pin = pin + self.t_notes = t_notes + self.t_tps = t_tps + + def run(self): + p = GPIO.PWM(self.pin,220) + p.start(15) + i = 0 + while(i