I'm using my Pi as a media center, and I wanted to install some basic hardware controls on the casing.
Now, from various tutorials I've gotten as far as this:
- Code: Select all
from time import sleep
import RPi.GPIO as GPIO
if ( GPIO.input(23) == False ):
Thing is, I would like the 'do something' bit to be something like 'pretend the up arrow key is pressed', but I can't find how to say that in Python. This leads me to believe it's either really easy, or really hard.
Can it be done? Can you tell me how? Also, if it can be done, I'd like to run the script all the time, from startup. And I also use the GPIO to control a character LCD through lcdproc, can I use these things together, or do they conflict?