Example #1
0
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()
Example #2
0
	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()