Created
August 18, 2015 10:16
-
-
Save valbeat/8dc6f2a53cef4a6933d4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from time import sleep | |
import os | |
import RPi.GPIO as GPIO | |
GPIO.setmode(GPIO.BCM) | |
GPIO.setwarnings(False) | |
GPIO.setup(13, GPIO.IN, pull_up_down=GPIO.PUD_DOWN) | |
GPIO.setup(19, GPIO.IN, pull_up_down=GPIO.PUD_DOWN) | |
GPIO.setup(26, GPIO.IN, pull_up_down=GPIO.PUD_DOWN) | |
while 1: | |
if GPIO.input(13): | |
os.system("'pkill -f 'omxplayer'") | |
os.system('omxplayer movie4.mov &') | |
sleep(1) | |
if GPIO.input(19): | |
os.system("'pkill -f 'omxplayer'") | |
os.system('omxplayer movie5.mov &') | |
sleep(1) | |
if GPIO.input(26): | |
os.system("'pkill -f 'omxplayer'") | |
os.system('omxplayer movie6.mov &') | |
sleep(1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment