diff --git a/gametest_rev1.py b/gametest_rev1.py index 3aa5e96..6a13d1a 100644 --- a/gametest_rev1.py +++ b/gametest_rev1.py @@ -452,6 +452,7 @@ while True: pygame.display.flip() if GPIO.input(pin_start) == True and pin_start_inhibit == False and game_running == False: #wait for the user to press start button + print("start pin has been detected, starting game") game_running = True # set an inhibitor bit to stop the contact from possibly vibrating and @@ -473,7 +474,7 @@ while True: # if the start pin is inhibited and at least 3 seconds have passed, # stop blocking the pin if pin_start_inhibit == True: - if (pygame.time.get_ticks()-start_ticks)/1000 > 3: + if ((pygame.time.get_ticks()-pin_start_inhibit_timer_start)/1000) > 3: pin_start_inhibit = False