def mainLoop(): #fps = 30 #clock = pygame.time.Clock() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: pygame.quit() #pygame.display.update() #clock.tick(fps) if(gpio_handler.isButtonPressed()): #run this in a thread runPhotoBooth() #photobooth finished, display request to user to hit button to begin again display.requestButtonToBegin()
time.sleep(7) def mainLoop(): #fps = 30 #clock = pygame.time.Clock() while True: for event in pygame.event.get(): if event.type == pygame.QUIT: pygame.quit() #pygame.display.update() #clock.tick(fps) if(gpio_handler.isButtonPressed()): #run this in a thread runPhotoBooth() #photobooth finished, display request to user to hit button to begin again display.requestButtonToBegin() if __name__ == "__main__": #verify we have printer access while(ink_levels.checkInkLevel() == False): display.displayContentText("Unable to access printer. Please toggle printer power.", True) time.sleep(1) #display request to user to hit buton display.requestButtonToBegin() #run indefinite main loop mainLoop()