0

Cannot create 64x64 image with Matrix Bonnet
Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Please be positive and constructive with your questions and comments.

Cannot create 64x64 image with Matrix Bonnet

by prcutler on Thu Dec 30, 2021 7:36 am

Hi all,

I need some help with an Adafruit Matrix Bonnet, 2 32x64 2.5mm pitch LEDs from Adafruit, a 5v 10amp power supply, and a Raspberry Pi 2.

I've soldered the E jumper according to the picture in the guide and shorted it to 8:

bonnet.png
bonnet.png (468.34 KiB) Viewed 69 times


I think the 2 matrices are only displaying mirrored image and not 64 rows all the time. I don't believe there's anything wrong with the matrices as I was able to display a 64x64 image in CircuitPython last week, but i need to use a Pi as I need more memory.

I've installed the RGBMatrix software via the script in the guide. I've tried to step through various command line arguments to see what happens.

This is what I think should work:

Code: Select all | TOGGLE FULL SIZE
udo ./demo -D0 --led-cols=64 --led-rows=64 led-chain=2
Suggestion: to slightly improve display update, add
   isolcpus=3
at the end of /boot/cmdline.txt and reboot (see README.md)
Size: 64x64. Hardware gpio mapping: adafruit-hat
Press <CTRL-C> to exit and reset LEDs


What i see is a 64x64 image, but cropped and mirrored:

mirrored.png
mirrored.png (498.75 KiB) Viewed 69 times


So then I stepped through the various options:

Code: Select all | TOGGLE FULL SIZE
sudo ./demo -D0
Suggestion: to slightly improve display update, add
   isolcpus=3
at the end of /boot/cmdline.txt and reboot (see README.md)
Size: 32x32. Hardware gpio mapping: adafruit-hat

Results in 4 boxes rotating (I think it's 2 32x32 squares mirrored for a total of 4)

Code: Select all | TOGGLE FULL SIZE
sudo ./demo -D0 --led-rows=64
Suggestion: to slightly improve display update, add
   isolcpus=3
at the end of /boot/cmdline.txt and reboot (see README.md)
Size: 32x64. Hardware gpio mapping: adafruit-hat
Press <CTRL-C> to exit and reset LEDs

Same 4 squares rotating

Code: Select all | TOGGLE FULL SIZE
sudo ./demo -D0 --led-cols=64
Suggestion: to slightly improve display update, add
   isolcpus=3
at the end of /boot/cmdline.txt and reboot (see README.md)
Size: 64x32. Hardware gpio mapping: adafruit-hat

2 squares rotating, 1 on top 1 on bottom (probably mirrored again?)

If I add the --led-chain parameter to any of the above that don't show it, it doubles the row or column I want:

Code: Select all | TOGGLE FULL SIZE
sudo ./demo -D0 --led-cols=64 --led-chain=2
Suggestion: to slightly improve display update, add
   isolcpus=3
at the end of /boot/cmdline.txt and reboot (see README.md)
Size: 128x32. Hardware gpio mapping: adafruit-hat


Code: Select all | TOGGLE FULL SIZE
sudo ./demo -D0 --led-rows=64 --led-chain=2
Suggestion: to slightly improve display update, add
   isolcpus=3
at the end of /boot/cmdline.txt and reboot (see README.md)
Size: 64x64. Hardware gpio mapping: adafruit-hat

This one says it's correct, but it's the same as the first one above that I think should work like the picture - a 64x64 square, but cropped to only fit one panel and mirrored on the other panel.

You can see from the command line output that the size does change, but it's always mirrored. What else should I try or be doing?

Any hints, tips, and suggestions are appreciated. Thank you in advance!

--P

prcutler
 
Posts: 5
Joined: Tue Jun 29, 2021 5:13 pm

Re: Cannot create 64x64 image with Matrix Bonnet

by prcutler on Thu Dec 30, 2021 8:15 am

I just saw the LED sub-forum and some similar threads, but no solutions.

Also wanted to add that I did try a different Raspberry Pi 2 and I did try adding

--led-slowdown-gpio=2 and --led-slowdown-gpio=0

but no changes.

I also tried swapping Pis, the power cable from the bonnet to the matrices, and an extra 2x8 cable I had purchased, but no luck

prcutler
 
Posts: 5
Joined: Tue Jun 29, 2021 5:13 pm

Re: Cannot create 64x64 image with Matrix Bonnet

by prcutler on Sun Jan 02, 2022 1:32 pm

I spent some of the weekend and re-wired everything. I already had an extra (3rd) cable and I tried that in almost every option I could think of. I also tried a 2nd Pi again, but no luck.

Is it worth asking for help in the LED forum? Or is it possible my Matrix Bonnet is bad? (I confirmed I can do 64x64 again on my MatrixPortal M4 in CircuitPython no problem).

Any help or tips are appreciated. Thanks!

prcutler
 
Posts: 5
Joined: Tue Jun 29, 2021 5:13 pm

Re: Cannot create 64x64 image with Matrix Bonnet

by prcutler on Sun Jan 02, 2022 6:14 pm

I modified one of the examples that comes with the RGBMatrix library to test it as well without any luck - it displays on one 32x64 matrix but not the other with this code. (The default code it came with did display, but mirrored on both panels).

This is the 64x64 code that does not work. It is a 64x64 image - the top panel shows half and the bottom panel is blank:
Code: Select all | TOGGLE FULL SIZE
from PIL import Image
from rgbmatrix import RGBMatrix, RGBMatrixOptions
import time

image = Image.open("cash.jpg")

# Configuration for the matrix
options = RGBMatrixOptions()
options.rows = 64
options.cols = 64
options.chain_length = 2
options.parallel = 1
options.hardware_mapping = 'adafruit-hat'  # If you have an Adafruit HAT: 'adafruit-hat'

matrix = RGBMatrix(options = options)

# Make image fit our screen.
image.thumbnail((matrix.width, matrix.height), Image.ANTIALIAS)

matrix.SetImage(image.convert('RGB'))

try:
    print("Press CTRL-C to stop.")
    while True:
        time.sleep(100)
except KeyboardInterrupt:
    sys.exit(0)

prcutler
 
Posts: 5
Joined: Tue Jun 29, 2021 5:13 pm

Please be positive and constructive with your questions and comments.