May-10-2022, 08:53 PM
No, what I am saying is that none of this code executes inside the thread.
And you have a bunch of other waits that don't happen inside the thread.
if led_off1==False and GPIO.input(senseur_Del2)==1: thread = Thread(target=ent.delai, args=()) <-----maybe at the wrong place or stop at the wrong time thread.start() GPIO.output(DEL1,True) time.sleep(.2) # Not in a thread GPIO.output(DEL1,False) time.sleep(.2) # Not in a thread led_off2=True # Should this be led_off1 == True? sleep(.5) # Not in a threadThis may only be 0.9 seconds of delay, but it happens continuously as long as GPIO.input(senseur_Del1) == 1.
And you have a bunch of other waits that don't happen inside the thread.