question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make a screen work without using get_device() from demo_opts

See original GitHub issue

I use a st7735 device on a RPI3b. It’s working if I use the get_device() function from demo_opts.py as in luma.examples. I use the following command :

python3 tst_luma.py --display st7735 --interface=spi --spi-bus-speed=16000000 --gpio-reset=24 --gpio-data-command=23 --gpio-backlight=18 --width=160 --height=128 --backlight-active=high --rotate=3

I’d like to define the rotation of the screen in my program. I tried these following lines instead of get_device() but it doesn’t work. Nothing is happening.

from luma.core.interface.serial import spi
from luma.lcd.device import st7735
serial = spi(port=0, device=0, gpio_DC=23, gpio_RST=24, cs_high=True, bus_speed_hz=16000000)
device = st7735(serial_interface=serial, width=160, height=128, rotate=3)

What am I doing wrong?

Thanks in advance

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
raf59commented, Jan 21, 2020

Perfect !!! Now, everything is working fine ! Thank you for your answer and also for this awesome library. Good job!

0reactions
rm-hullcommented, Jan 19, 2020

oh, you can pass active_low=True|False when initializing the device to indicate whether the backlight is active low or high

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can You Use A Monitor Without A PC? We Tested Everything ...
In this guide, we will discuss all the possible ways of using a monitor without connecting to a PC. Let's take a look!...
Read more >
GetDeviceCaps function (wingdi.h) - Win32 - Microsoft Learn
The GetDeviceCaps function retrieves device-specific information for the specified device.
Read more >
Fix a screen that isn't working right on Android - Google Support
Fix a screen that isn't working right on Android. Try the solutions below if your phone screen: Doesn't respond; Flickers; Jumps; Flashes; Shows...
Read more >
Display | Android Developers
Use WindowMetrics#getBounds() to query the application window bounds. ... If this flag is not set then the display device may not have a...
Read more >
How To Fix Any Laptop - Screen Doesnt Work, Stays Black ...
THIS VIDEO HAS BEEN UPDATED HERE: https://youtu.be/e9iy30J00-kIf your laptop computer turns on but the screen stays black or dim without ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found