-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The function device.backlight(False) turns on the lights, instead of device.backlight(True) #153
Comments
same happening with hd44780. |
Using active_low=False as a parameter for the device object, makes the device.backlight(True) function turn the lights on and GPIO.input(18) returns 1. By default active_low parameter is always in boolean condition as True as long as it is not provided by the programmer.
active low in electronics means a pin plugged to ground for enable a function (In this case, the backlight), and an active high is a pin plugged to 5V or 3.3V for enable a function (In this case, the backlight). From what I see this is normal. I suppose that for all LCD screens the backlight pin will not always be active low, as is the case with pcd8544 and hd44780 (without i2c backpack) Please confirm if this is the case. |
Not sure what you want me to confirm, but my hd44780 is connected to gpio pin 27, causing the backlight to be enabled all the time unless I call self.display = hd44780(self.interface, width=20, height=4, gpio_LIGHT=27) |
@thijstriemstra see: https://luma-lcd.readthedocs.io/en/latest/python-usage.html#backlight-control |
backlight(True) disables the backlight, which is incorrect imo, sorry if I wasn't clear. I would expect it the other way around like the docs state. |
@thijstriemstra Wait, this is not a bug, it is something expected. Haven't you read what I said?. The only thing I think is that active_low should be False by default by the luma.lcd library, since the backlight pin, which is almost always a positive pin leading to an LED must be active high for it to turn on |
Tested on ST7735 with same behavior: device.backlight(False) makes turn on backlight LED |
Type of Raspberry Pi
Raspberry Pi Zero W V1.1
Linux Kernel version
Linux raspberrypi 5.10.63+ #1459 Wed Oct 6 16:40:27 BST 2021 armv6l GNU/Linux
Expected behaviour
Hardware: Nokia 5510
I was waiting for GPIO.input(18) to return 1 and the lights would turn on
Actual behaviour
GPIO.input(18) returns 0 and the lights do not turn on, but when changing the device.backlight(True) function to device.backlight(False) the lights turn on and GPIO.input(18) returns 1
The text was updated successfully, but these errors were encountered: