Hi,
I just tried to set the brightness of my screen using python and RPI.GPIO but it looks like that this kills the driver…
Here is my Code:
try:
import RPi.GPIO as GPIO
except RuntimeError:
print("Error importing RPi.GPIO!")
debuggerprint("Error importing RPi.GPIO!",1)
LCDBrightnessPin = 22
GPIO.setmode(GPIO.BOARD) # Set to GPIO Name Mode
GPIO.setup(LCDBrightnessPin, GPIO.OUT)
p = GPIO.PWM(LCDBrightnessPin, 100)
p.ChangeDutyCycle(60)
The code compiles fine, but when I load it I get “Warning this Channel is already in use [blabla]” and the Screen is still at 100%.
After I kill the application the screen turns black completly, but just a black picture, the Backlight intensity doesnt change. I then have to reboot the Pi to get the screen back to live.
Any suggestions?
Thanks!
Patrick
EDIT: Fixed it, hat to use Pin Number 15 instead of 22 ๐