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.

getting display() to work properly

See original GitHub issue

Type of Raspberry Pi

Raspberry Pi 3 B Plus

Linux Kernel version

Linux raspberrypi 4.14.52-v7+ #1123 SMP Wed Jun 27 17:35:49 BST 2018 armv7l GNU/Linux

Expected behaviour

I am trying to use display() to work, showing a (rather crude) drawing of a pair of eye on two daisy chained 8x8 matrices. The setup works fine with all examples provided, and I can tweak them to chance text, speeds and other characteristics of the displayed content.

Still, I can’t get display() to work, that is, I can’t display drawings of my own concoction.

Here is the code that got me the farthest: it doesn’t generate errors and <<something>> (I can’t be sure what) flashes briefly on the displays. The code:

import numpy as np
from PIL import Image

from luma.core.interface.serial import spi, noop
from luma.led_matrix.device import max7219

serial = spi(port=0, device=0, gpio=noop())
device = max7219(serial, cascaded=2)

pixels = np.array([[000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000],
                   [000,000,000,255,255,000,000,000,000,000,000,255,255,000,000,000],
                   [000,000,255,000,000,255,000,000,000,000,255,000,000,255,000,000],
                   [000,255,000,000,000,000,255,000,000,255,000,000,000,000,255,000],
                   [000,255,000,000,255,000,255,000,000,255,000,000,255,000,255,000],
                   [000,255,000,255,255,000,255,000,000,255,000,255,255,000,255,000],
                   [000,000,255,000,000,000,255,000,000,255,000,000,000,255,000,000],
                   [000,000,000,255,255,255,000,000,000,000,255,255,255,000,000,000]])
				   
img = Image.fromarray(pixels, '1')

device.display(img)

Actual behaviour

Something (I can’t be sure what) flashes briefly across the displays. And that’s it. The code runs without errors, but nothing happens.

I have tried putting the display() command on an infinite loop, but still no result.

If I could be so bold, can an example of the correct usage be provided?

Thanks for any support you can provide (I am quite new on both python, raspberry pi and luma).

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
polterbytecommented, Sep 8, 2018

The examples work fine, and I even got an example you provided here on issues, that lights up random dots, four at a time.

0reactions
thijstriemstracommented, Mar 18, 2019

No feedback, closing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix a Computer That Turns on but Displays Nothing
Power off your computer while in a power saving mode by holding the power button down for 3-5 seconds. After the power is...
Read more >
[SOLVED] Computer turns on but no display (2022) - Driver Easy
Fix 2: Check if your monitor is working. If your computer starts but displays nothing, you should check is if your monitor is...
Read more >
Office Ergonomics - Positioning the Monitor : OSH Answers
What factors decide the proper position of the computer monitor? What should you know while setting up an appropriate viewing angle?
Read more >
How to Fix Computer No Display or No Signal on Monitor
In this video I show a bunch of solutions to fix computer no display or no signal on your monitor. Shop online (Thanks...
Read more >
How to FIX Computer No Display OR No Signal on Monitor
So your having trouble getting a display on PC monitor ? Computer Turns On But No Display On Monitor ? I will show...
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