python - Time management for real-time applications -
how generate precise pulses python?
from threading import thread import time def runa(): while true: print "a" sendsignal(1) time.sleep(0.0001) sendsignal(0) time.sleep(0.005) if __name__ == "__main__": t1 = thread(target = runa) t1.setdaemon(true) t1.start() while true: sleep(10) time management in python not precise. specially create multi-threaded pwm generators (assuming each thread send data @ specific rate) . there better way generate pulses? precise ones!
[the solution language-independent]
my solution find real-time os raspberry pi have real-time patch raspbian os
for more information : https://www.raspberrypi.org/forums/viewtopic.php?t=39951
was little of challenge enable it. working , error rate dropped dramatically.
thank @holdenweb tip real-time os
Comments
Post a Comment