import RPi.GPIO as GPIO
import time
import sys, os, time
from subprocess import PIPE, Popen
GPIO.setmode(GPIO.BCM)
GPIO.setup(18, GPIO.IN, pull_up_down=GPIO.PUD_UP)
while True:
input_state = GPIO.input(18)
if input_state == False:
print('Button Pressed')
proc=Popen(['omxplayer','test1.3gp'], stdout=PIPE)
time.sleep(0.2)
Click to Expand
Content Rating
Is this a good/useful/informative piece of content to include in the project? Have your say!
You must login before you can post a comment. .