23 lines
		
	
	
		
			540 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			540 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| #!/usr/bin/env python
 | |
| 
 | |
| import RPi.GPIO as GPIO
 | |
| import time
 | |
| 
 | |
| GPIO.setmode(GPIO.BOARD)
 | |
| 
 | |
| input_pin = 3
 | |
| 
 | |
| GPIO.setup(input_pin, GPIO.IN)
 | |
| 
 | |
| while True:
 | |
|         if not(GPIO.input(input_pin)):
 | |
|                 time.sleep(1)
 | |
|                 #starte externen timer
 | |
|                 #starte externen zähler
 | |
| 
 | |
| 
 | |
|                 #Endpunkt: timer wird gespeichert und das externe programm beendet
 | |
|                 #zähler wird gespeichert und zurückgesetzt
 | |
| 
 | |
|                 #Score wird gespeichert und geliestet \ Score tabbel wird ca. 8sek. lang angezeigt
 |