Posts: 11
Joined: Sat Sep 10, 2011 3:03 pm
Contact: Website

Display turns White after toggling Backlight

Thu Nov 29, 2018 2:30 am

I am using one of these for my RPi3 B+ ... SKU:398437

I wrote and small script

Code: Select all

from gpiozero import Button
from time import sleep
import RPi.GPIO as GPIO


GPIO.setup(27, GPIO.OUT)

backlightON = Button(17)
backlightOFF = Button(4)

isON = True

while True:
        if (isON) and (backlightOFF.is_pressed):
                isON = False
                GPIO.output(27, GPIO.LOW)
                print "Screen OFF"          

        elif (not isON) and (backlightON.is_pressed):
                isON = True
                GPIO.output(27, GPIO.HIGH)
                print "Screen ON"
to control the Backlight using the buttons on the display, followed the examples on the wiki, But when i turn in Off and on again sometimes it turns White when its on and there is nothing on the screen.... Can anyone help me figure out a fix for this or could it just be a hardware issue???

Return to “HATs and other add-ons”