I recently bought some wonderful Adafruit products with Adafruit reseller exa-tech.de to make a portable RetroPie emulator.
Amongst those is a Adafruit 5" 800x480 TFT HDMI Backpack screen which works great btw.
I'm still fairly new at all this but i'm willing to learn so I already did some research:
I read it is possible to control the backlight with a pwm signal, I also know it is possible on the pi to use gpio 18 for a hardware pwm signal and other to use software pwm.
I've only seen small examples of controlling a led and basic servos, more as a proof of concept that a real world application.
This brings me to my question:
Would it be technically possible to implement 2 buttons to drive that backlight control?
I read an interesting bit here which talks about using interrupts to read button presses (to not use cpu power with 'while loops').
Code: Select all
http://raspi.tv/2013/how-to-use-interrupts-with-python-on-the-raspberry-pi-and-rpi-gpio-part-3
Code: Select all
gpio -g mode 18 pwm
gpio -g pwm 18 1
gpio -g pwm 18 1000
gpio -g pwm 18 0
Also I was hoping if somebody could show me were exactly I would need to connect this signal on the screen.
I hope my explanation is some what clear, as I said I'm still learning how this all works. Feel free to correct me If I'm interpreting something wrong.
Thanks in advance for any help in steering my in the right direction.
Regards,
Maarten