Closed unitythemaker closed 3 years ago
I think this problem is not luma specific. It's more like about Pillow. I'll try to research about it.
Edit: luma.oled doesn't work too I tested it now. AttributeError: module 'PIL.ImageFont' has no attribute 'ImageFont'
I ran the library on my RPi 3B without errors. The problem is related to Pi Zero. Can you make it run on Pi Zero? TY anyways.
Hmm, I doubt that. What python version are you using? Same version on both RPi 3B and Pi Zero? What operating system (version)?
Common
Raspbian Lite (the versions are same because installed w/ RPi Imager and the image was cached and didn't redownload therefore the OS' are same.)
pi@raspberrypi:~ $ python3 --version
Python 3.7.3
Installed pip via sudo apt install python3-pip.
Ran apt upgrade before installing & trying these.
RPi3B
pi@raspberrypi:~ $ pip3 --version
pip 18.1 from /usr/lib/python3/dist-packages/pip (python 3.7)
pi@raspberrypi:~ $ uname -a
Linux raspberrypi 5.10.63-v7+ #1459 SMP Wed Oct 6 16:41:10 BST 2021 armv7l GNU/Linux
# Notice the armv7l may it can help
RPi Zero WH
pi@raspberrypi:~ $ pip3 --version
pip 21.3.1 from /usr/local/lib/python3.7/dist-packages/pip (python 3.7)
pi@raspberrypi:~ $ uname -a
Linux raspberrypi 5.10.63+ #1459 Wed Oct 6 16:40:27 BST 2021 armv6l GNU/Linux
# Notice the armv6l may it can help
some ideas:
pip install Pillow==8.2.0
)virtualenvwrapper
so you can stop using sudo
and work in a virtual environment insteadsudo
after not seeing any changeThe matrix doesn't change it's initial shape and the code doesn't give any error also shows logs like
Created device
MAX7219 LED Matrix Demo
However I can see the brightness of leds are changing slightly. I saw some issues about it like #102.
Also I've newly noticed that the boards in the images are not same with mine. Mine have a MAX7219CNG integrated. I don't know if that will make any change about that problem but it worked with RPi3B first. Now it doesn't even if I re-install the OS and try the same things on RPi3B.
(I'm running the code examples/matrix_demo.py)
Edit: Tried connecting matrix to SPI1 by looking at #169 & #204 and still no change.
# changed this line & changed wiring
serial = spi(port=0, device=1, gpio=noop())
I've tried running this matrix with Arduino UNO and still no change. It seems like the problem is way more different. TYSM for helping me!
I found the problem. The integrated was connected incorrectly.
I found the problem.
nice!
The integrated was connected incorrectly.
Can you be a little more specific? Maybe it helps others googling similar problems.
Oh, ok. As you can see in the images: The integrated is attached onto a black header. However in the PCB, it shows it's correct direction but it is soldered in the wrong direction. Therefore you attach the integrated by looking at the header's side that has a semicircle. Which is actually the wrong direction according to PCB.
Type of Raspberry Pi
Raspberry Pi Zero WH
Linux Kernel version
Linux raspberrypi 5.10.17+ #1414 Fri Apr 30 13:16:27 BST 2021 armv6l GNU/Linux
Expected behaviour
I'm expecting Python to run the code without errors. I inspected 10s of issues but didn't find any solution. Before getting that error I was getting something like: No module named luma.led.matrix found or same for luma.core.
Actual behaviour