Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing the Matrix size from 64 x 64 to 128 x 128 #6

Open
flasher69 opened this issue Dec 2, 2021 · 5 comments
Open

Changing the Matrix size from 64 x 64 to 128 x 128 #6

flasher69 opened this issue Dec 2, 2021 · 5 comments

Comments

@flasher69
Copy link

Hi Marc,

I wanted to ask you how do I have to modify the neomatrix_config.h file in order to change the matrix size from 64 x 64 to 128 x 128 or other dimensions. I'm using Teensy 3.5 and Smartmatrix shield.

Thank you for all your efforts and this great project.

cheers

@marcmerlin
Copy link
Owner

marcmerlin commented Dec 2, 2021

\Hi, didn't realize you were the same person from the other issue :)

First, make sure you get it working with just SmartMatrix, enough to init the matrix and write hello world or running https://github.com/pixelmatix/SmartMatrix/tree/master/examples/FeatureDemo

Also, as a tip, when you paste code, add a ``` ``` around it.

like this

:)

Once you have it working with Smartmatrix, in neomatrix_config.h, set

const uint16_t MATRIX_TILE_WIDTH = 128; 
const uint16_t MATRIX_TILE_HEIGHT = 128;

the tile stuff is used for neopixel matrices where pixels are not in order, but for RGBPanels it's not a problem, so you don't need this.

@flasher69
Copy link
Author

Haha! Yes, that was me too. The guy with a lot of issues! 🤣

I think I didn't clearly say what was my problem. I have four HUB75 64 x 64. I'm trying to modify the neomatrix_config.h file, so I can have the animation divided on all four panels but the animation is repeating on each panel and they all look the same. That's why I thought, that I need to change the matrix size. Unfortunately when I change the lines as you said, nothing works at all

2021-12-03 01 03 39

@marcmerlin
Copy link
Owner

marcmerlin commented Dec 3, 2021

Just to be clear, you want the framebuffer to be 128x128, and each panel contains 1/4th of the framebuffer, correct?
If so, you first need to get that working with Smartmatrix itself (forget smartmatrix::gfx and neomatrix_config.h for now) with the featuredemo example I mentioned.
The way it'll work is you need all 4 panels to be plugged daisy chained and you need to tell smartmatrix about your layout. That's in the smartmatrix docs somewhere or you can ask on the smartmatrix forum if you get stuck.
Once that is working you should be able to copy the smartmatrix init inside neomatrix_config.h

@flasher69
Copy link
Author

Just to be clear, you want the framebuffer to be 128x128, and each panel contains 1/4th of the framebuffer, correct?

Exactly!

If so, you first need to get that working with Smartmatrix itself (forget smartmatrix::gfx and neomatrix_config.h for now) with the featuredemo example I mentioned. The way it'll work is you need all 4 panels to be plugged daisy chained and you need to tell smartmatrix about your layout. That's in the smartmatrix docs somewhere or you can ask on the smartmatrix forum if you get stuck. Once that is working you should be able to copy the smartmatrix init inside neomatrix_config.h

Oh! I see! Alright I will try that tomorrow when I had some sleep but at least I got that working with smartmatrix demo and Teensy 4/Smartmatrix Shield V5

Thank you so much for your help and sorry for all the annoying questions. I just want to understand how it all works :)

Cheers
2021-12-03 01 48 02

@marcmerlin
Copy link
Owner

No worries, how to do layout of matrices and mapping is not super obvious
FastLED::NeoMatrix supports some weird remapping from using small LED panels and connecting them together.
For RGBPanels, the layout and remapping is actually done by SmartMatrix. It's not much configurable, but for something simple like a 2x2 matrix, the defaults work just fine.
Once you have the init working you should be able to copy it in framebuffer::gfx and it will write in it as if you had a big 128x128 display from a single panel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants