0

lcd.backlight not working on Adafruit Blue&White 16x2 LCD+Ke
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

lcd.backlight not working on Adafruit Blue&White 16x2 LCD+Ke

by hcgilje on Wed Jun 23, 2021 10:02 am

Hi,
I have the Adafruit Blue&White 16x2 LCD+Keypad Kit for Raspberry Pi
https://www.adafruit.com/product/1115
I am able to use the screen and buttons, but when I am closing the python sketch the backlight remains on, which is a bit annoying.
Since the backlight is off when I start up the pi and before the python script is executed, I am assuming there would be a way to turn it off as well.
I found the command lcd.backlight, but setting this to False doesn´t have any effect.

HC

hcgilje
 
Posts: 75
Joined: Fri Aug 15, 2008 8:51 am
Location: Norway

Re: lcd.backlight not working on Adafruit Blue&White 16x2 LC

by achalid on Wed Jun 23, 2021 2:43 pm

7-Segment Display w/I2C.

ORDER #2590788-9889467699
I am not sur but both 7 Segement display are not working yet I purchased Adafruit 0.56" 4-Digit 7-Segment Display w/I2C Backpack - White [ADA1002] from Amazon used the sevenseg IDE and is working fine
Both 7 Segment from is order ORDER #2590788-9889467699 are defective I would like to return them or replacement. Please let me know.
Thanks.

achalid
 
Posts: 9
Joined: Tue Jan 07, 2020 4:49 pm

Re: lcd.backlight not working on Adafruit Blue&White 16x2 LC

by hcgilje on Wed Jun 23, 2021 3:55 pm

please start your own thread as this has nothing to do with my post.

hcgilje
 
Posts: 75
Joined: Fri Aug 15, 2008 8:51 am
Location: Norway

Re: lcd.backlight not working on Adafruit Blue&White 16x2 LC

by adafruit_support_carter on Wed Jun 23, 2021 5:37 pm

That backlight property should work. Are you running one of the examples from the library?

adafruit_support_carter
 
Posts: 20623
Joined: Tue Nov 29, 2016 2:45 pm

Re: lcd.backlight not working on Adafruit Blue&White 16x2 LC

by hcgilje on Thu Jun 24, 2021 3:08 am

I am using the code from https://learn.adafruit.com/adafruit-16x2-character-lcd-plus-keypad-for-raspberry-pi/python-usage and https://learn.adafruit.com/character-lcds/python-circuitpython
The latter introduces the lcd.backlight = True and lcd.backlight = False commands.
Everything else relevant to the mono display I am using is working as expected.

hcgilje
 
Posts: 75
Joined: Fri Aug 15, 2008 8:51 am
Location: Norway

Re: lcd.backlight not working on Adafruit Blue&White 16x2 LC

by adafruit_support_carter on Thu Jun 24, 2021 11:31 am

Try treating it as an RGB backlight and controlling it with the color setter. For example, use the code here:
https://learn.adafruit.com/adafruit-16x ... thon-usage
and turn off the backlight with:
Code: Select all | TOGGLE FULL SIZE
lcd.color = [0, 0, 0]

adafruit_support_carter
 
Posts: 20623
Joined: Tue Nov 29, 2016 2:45 pm

Re: lcd.backlight not working on Adafruit Blue&White 16x2 LC

by hcgilje on Thu Jun 24, 2021 3:03 pm

ah, excellent, that did the trick!
I was assuming lcd.color to be related to the RGB version, not the monochrome version.

hcgilje
 
Posts: 75
Joined: Fri Aug 15, 2008 8:51 am
Location: Norway

Re: lcd.backlight not working on Adafruit Blue&White 16x2 LC

by adafruit_support_carter on Thu Jun 24, 2021 4:12 pm

In general it is. The fix is a bit of a hack. There are several LCD products and it looks like the library is currently setup to use a different pin for the monochrome version than what the Pi Plate uses. Probably because it was only tested for on the other variants. By using the color variant hack, all three pins are utilized, so the required one is getting written as well as two that don't matter.

It's just the first value (red) in the triplet that is doing the work. The other two don't matter. For the monochrome display, the backlight is wired to the same pin used for the red channel on the RGB versions.

adafruit_support_carter
 
Posts: 20623
Joined: Tue Nov 29, 2016 2:45 pm

Please be positive and constructive with your questions and comments.