I have a project that is using a Pi and omxplayer to play a specific video file in a public kiosk of sorts. Up until now I've used Pikeyd to launch omxplayer upon one keypress of a switch connected to gpio, and stop the playback through another switch attached to a separate gpio input.
For reason's I won't get in to I can only use one switch moving forward and I need to launch omxplayer when the switch is closed and maintain the playback as long as the switch remains closed. Once the switch is released I need omxplayer to quit and be ready to launch from the beginning of the video file again if the switch is again pressed.
I'm assuming a python script could handle something like this, but I am not really a programmer and don't have a lot of time to figure it out right now. This thread about triggering a camera from gpio looks like it might have some useful tips but Istill wouldn't know how to kill omxplayer upon release of the switch: http://www.raspberrypi.org/forums/viewt ... 5&p=399904
I understand there's something called Pexpect that can control other programs to a certain extent but I looked at it and it's beyond my abilities without some help. Is there anyone out there that could provide some sample code on how to do something like this? I'd be happy to paypal somebody $30 if you post a useable script in the next day or two.
thanks much.