Comments (7)
same happening with hd44780.
from luma.lcd.
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.
device = pcd8544(serial, active_low=False)
device.backlight(True)
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).
In this case, the backlight pin is an active high, since to turn on, a voltage needs to be supplied
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.
from luma.lcd.
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 backlight(True)
.
self.display = hd44780(self.interface, width=20, height=4, gpio_LIGHT=27)
from luma.lcd.
@thijstriemstra
This is not how the backlight function works, backlight(True) should turn on the LED, not turn it off
see: https://luma-lcd.readthedocs.io/en/latest/python-usage.html#backlight-control
"The backlight can be programmatically switched on and off by calling device.backlight(True) or device.backlight(False) respectively."
from luma.lcd.
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.
from luma.lcd.
@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
from luma.lcd.
Tested on ST7735 with same behavior: device.backlight(False) makes turn on backlight LED
from luma.lcd.
Related Issues (20)
- Error trying PWMBacklight with ili9341 HOT 23
- Help with speed difference between SBCs HOT 15
- ili9341 and PWM support? HOT 1
- Thoughts on Bridgetek EVE (Embedded Video Engine) HOT 11
- Support for ili9486 HOT 9
- Trying to get this to work with Spotpear LCD HOT 20
- ST7789 - maximum height and width? HOT 9
- Multiple TFT Screens (ST7735) HOT 2
- Standard 'gpio_LIGHT' pin causes crash of I2S HOT 1
- Support ILI9488 3.5" (320x480) displays HOT 4
- DeprecationWarning: getsize is deprecated and will be removed in Pillow 10 (2023-07-01)
- RuntimeError: This module can only be run on a Raspberry Pi! HOT 3
- Comment error: HT1621 may actually 1/3 bias HOT 2
- ILI9341 issue?
- st7735 white screen HOT 1
- Question: HD44780 Cursor Show/Hide and Line/Blink
- This is simply a question / request: Have you ever consider porting this great project to micropython? HOT 2
- How to create custom characters, use function _make_custom HOT 2
- Is the ILI9341V display supported? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from luma.lcd.