Etape 24 : RXTX : début
#Threads OpenCV stuff. OpenCV = threading.Thread(target=OpenCV) OpenCV.start() #Threads the serial functions. rxtx = threading.Thread(target=rxtx) rxtx.start() #Threads the motor functions. motorTimer = threading.Thread(target=motorTimer) motorTimer.start() |
Enfin, nous ouvrons notre seconde fonction filetée. Cette fonction est beaucoup plus petite que la fonction OpenCV. Ici, toutes les communications série se déroule.
289: Cela aide dans la traduction ASCII.
292-296 : Variables globales pour passer des informations de robot à d’autres threads.