adafruit / RGB-matrix-Panel

Arduino library and example code for the 16x32 RGB matrix panels in the shop
http://www.adafruit.com/products/420
303 stars 145 forks source link

Add support for chained panels #4

Open seattleandrew opened 11 years ago

seattleandrew commented 11 years ago

Now that the Arduino Due is out, I think it should be possible to update the code to support chained displays since previous Arduino's lacked the CPU speed and RAM to support more than one display.

ellensundh commented 11 years ago

I think so too!

protonmaster commented 11 years ago

I have almost updated the driver to support multiple panels. Currently tested up to 3 panels on a Mega 2560.

The driver currently has AVR specific assembly code in it which will need to be updated to support the Due. As the project I am working on may require the Dues speed, I may update the driver to support the Due as well.

Thanks

seattleandrew commented 10 years ago

Hey @protonmaster any news on the support for chainable code + Due Support? I'm willing to create a bounty to update the public code to support those features :)

protonmaster commented 10 years ago

Hi @seattleandrew thanks for reminding me to get back to this. I have pushed the AVR code for chaining multiple of the 16x32 panels. The code expects the panels to be chained in a long line. That is 1x2, 1x3, 1x4 etc. It cannot be used to make a square for example. You will find that you will run out of RAM pretty quickly with this. On the Mega2560 with 1x4 configuration, it uses most of the RAM. I tried allowing this to work on the Due, but I do not know enough about the ARM to proceed, and will therefore not be adding this functionality.

The main difference to the user is the constructor. It has an other parameter to say how many panels wide the system is. RGBmatrixPanel(uint8_t a, uint8_t b, uint8_t c, uint8_t sclk, uint8_t latch, uint8_t oe, boolean dbuf, uint8_t pwidth);

Let me know how it goes, and I will fix any issues you find.

Thanks

seattleandrew commented 10 years ago

Hey again @protonmaster the panels I was hoping to chain up were two 32x32 and one of the main reasons why I was going with the ARM (Due) was to get extra power to run other lights/functions. I'm really hoping that I can just toss money at this until it gets solved.

protonmaster commented 10 years ago

Hey @seattleandrew I have not had a chance to use the 32x32 panels nor do I plan to do any projects with them. At the moment the AVR Mega has the power I require and I am not familiar enough with the ARM (Due) to port the lower level code over. I found with the Mega running 4x 16x32 panels that I was able to have a number of other lights/buttons and other functions running with out issue.

What is the problem/project that you are trying to complete?

seattleandrew commented 10 years ago

I'm upgrading a costume piece (helmet) from using two red 16x24 LED displays to a helmet that uses two large RGB panels, the red panels will become a mouth, I'll also be running a microphone, a small OLED display, and two RGB LED strips (neopixel). It's a large project since it's an upgrade for a costume I use during shows I perform at.

I'm okay with getting a Mega, I just assumed that with all of the hardware I was running that ARM would be better... I'm starting to think that ARM is a hassle in the Arduino world.

protonmaster commented 10 years ago

Hey, sounds like a really interesting project @seattleandrew I think you may need to use multiple Megas (just for the RAM and speed) or use the ARM.

At the moment the ARM is not well supported by 3rd party drivers (as you are finding out)

How many 32x32 panels will you be using? And what sorts of patterns would you show on them? I ask, as it might be possible to use 2x 16x32 in place of a 32x32 but you will need to be more careful when writing your patterns to be pixel buffers.

seattleandrew commented 10 years ago

@protonmaster I'm just planning to use two of the 32x32 and I typically create eyes with animations. I'll share a video of some of my stuff: https://www.youtube.com/watch?v=Bg1WKvRFk10

protonmaster commented 10 years ago

@seattleandrew thanks for the video clip, I now have a reasonable idea of what you are trying to do. Very cool.

When are you wanting to complete this new costume by? (Date?)

Thanks

seattleandrew commented 10 years ago

@protonmaster I'd love to get this done by New Years (I have all the parts), but if that date slips-- then before September 2014 (Penny Arcade Expo) would be good

protonmaster commented 10 years ago

Sept 2014 I can do. Christmas/New Years is getting a little soon. I will look in to the AVR and the 32x32 matrix I already have the DUE, I will get in some 32x32 panels and see what I can do, when I have a spare minute.

Thanks

protonmaster commented 10 years ago

BTW, the RGB panels pull quit a lot of current when they are displaying a bright image. How are you planning on powering this?

Thanks

protonmaster commented 10 years ago

Depending on my work load (day job) an other commitments I might be able to get this done by Christmas, but I do not promise anything.

seattleandrew commented 10 years ago

@protonmaster I'm going to power it via several chained 8AA Battery Packs, this is to both acquire high amperage as well as 12v to power some potential components (EL wire/tape). I don't plan to engage all the LEDs ALL the time, so it's a concern but not as bad as you think. No promises, totally understood. Like I said before, I am willing to compensate you for your work for the community.

protonmaster commented 10 years ago

@seattleandrew lets get this thing working before we worry about any conpensation. I just enjoy working on this stuff, so I am not too worried about it. I also do electronics, so I could work out some power solutions for you as well if we find that the AAs are not enough.

Thanks

seattleandrew commented 10 years ago

@protonmaster that sounds good to me :) In the meantime, I'll try to pick up a Mega just so I can Proof-Of-Concept the helmet until the Due code is ready.

Scott216 commented 10 years ago

I tried to setup two 16x32 panels with a Mega, but I can't get it working. I posted details in the Adafruit forum: http://forums.adafruit.com/viewtopic.php?f=47&t=22521&sid=70f7a86a884ac928fea34dd3f518b357&start=30#p234271

protonmaster commented 10 years ago

Hi @Scott216, I have tried your sketch with this version of the RGB matrix with out issue. I hope you are able to get your project going. Cable length to the display should be short as possible, and the port connections must be correct. The graphics frame buffer uses a lot of RAM, if all the RAM is used the project may just crash.

protonmaster commented 10 years ago

Hi @seattleandrew, I have only just ordered the 32x32 Panels. Things have been pretty busy at work and I also had an awesome weekend climbing. Its Summer here in New Zealand, so not so inclined to sit inside working on this. But the Christmas break is coming up, so some project time is always nice.

seattleandrew commented 10 years ago

@protonmaster that's super cool. It's winter here in Seattle and it's freezing cold. I hope you enjoy your summer. I'm still hoping to do Something with the 32x32 panels. I think the end result will look awesome if we ever get it done.

Scott216 commented 10 years ago

I got it working. I was using the version of RGBmatrixPanel.cpp in this repository. It worked when I downloaded the version from this forum post: http://bit.ly/1gMEJ4h

Have you thought about forking this repository to hold your version?

Also, it doesn't work with double buffering turned on. Is that expected with your version. I'm using two panels on an Arduino Mega.

protonmaster commented 10 years ago

Hi @Scott216 Double buffering on my version works fine with up to four panels on a Mega2560. Though the RAM is almost completely used. Using double buffering on the Mega (which has 4kB RAM) should use ~3kB of RAM for the frame buffer, leaving 1kB for other things.

I thought I had forked my version, I will have a look in to that.

As for the version at http://bit.ly/1gMEJ4h it looks like he made similar changes to what I did.

protonmaster commented 10 years ago

My fork of the code is here: https://github.com/protonmaster/RGB-matrix-Panel

NetForces commented 10 years ago

@protonmaster I picked-up some outdoor high brightness panels from China. Those are apparently 1/4 scanning compared to 1/8 scanning. Any quick clue on how the library could be modified to use those ?

protonmaster commented 10 years ago

Hi,

I no longer support this software. I put it in the public domain as I had modified it for my work and thought I should give something back.

I will have a quick look to see what is required for 1/4 vs 1/8 scanning for feasibility.

Thanks


Quantum Entanglement; Faster than light Information Transfer, Experiment http://www.nature.com/news/2008/080813/full/news.2008.1038.html:

The experiment shows that in quantum mechanics at least, some things transcend space-time, says Terence Rudolph, a theorist at Imperial College London. It also shows that humans have attached undue importance to the three dimensions of space and one of time we live in, he argues. “We think space and time are important because that’s the kind of monkeys we are.”

Nature Magazine http://www.nature.com/news/2008/080813/full/news.2008.1038.html

On Thu, Jun 26, 2014 at 4:14 AM, NetForces notifications@github.com wrote:

@protonmaster https://github.com/protonmaster I picked-up some outdoor high brightness panels from China. Those are apparently 1/4 scanning compared to 1/8 scanning. Any quick clue on how the library could be modified to use those ?

— Reply to this email directly or view it on GitHub https://github.com/adafruit/RGB-matrix-Panel/issues/4#issuecomment-47123790 .

NetForces commented 10 years ago

Great thanks.

Sent from my iPhone

On Jun 25, 2014, at 5:42 PM, protonmaster notifications@github.com wrote:

Hi,

I no longer support this software. I put it in the public domain as I had modified it for my work and thought I should give something back.

I will have a quick look to see what is required for 1/4 vs 1/8 scanning for feasibility.

Thanks


Quantum Entanglement; Faster than light Information Transfer, Experiment http://www.nature.com/news/2008/080813/full/news.2008.1038.html:

The experiment shows that in quantum mechanics at least, some things transcend space-time, says Terence Rudolph, a theorist at Imperial College London. It also shows that humans have attached undue importance to the three dimensions of space and one of time we live in, he argues. “We think space and time are important because that’s the kind of monkeys we are.”

Nature Magazine http://www.nature.com/news/2008/080813/full/news.2008.1038.html

On Thu, Jun 26, 2014 at 4:14 AM, NetForces notifications@github.com wrote:

@protonmaster https://github.com/protonmaster I picked-up some outdoor high brightness panels from China. Those are apparently 1/4 scanning compared to 1/8 scanning. Any quick clue on how the library could be modified to use those ?

— Reply to this email directly or view it on GitHub https://github.com/adafruit/RGB-matrix-Panel/issues/4#issuecomment-47123790 .

— Reply to this email directly or view it on GitHub.

pshanischara commented 8 years ago

i have an problem with displaying the data in a chain. i have connected the display using spi but they are displaying the same content at a time instead of sliding of data please help me with it

Therolon commented 8 years ago

Any luck with the 1/4 scan RGB led's matrix?

pshanischara commented 8 years ago

not yet

On Wed, Aug 24, 2016 at 2:39 AM, Therolon notifications@github.com wrote:

Any luck with the 1/4 scan RGB led's matrix?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/adafruit/RGB-matrix-Panel/issues/4#issuecomment-242009454, or mute the thread https://github.com/notifications/unsubscribe-auth/ATEaIBRd7AcHvPeUQ2bTyzgIr3I_O7n7ks5qjBFEgaJpZM4Af6s7 .

laundryjuara2016 commented 7 years ago

hi,

anyone can tell me how to wire rgb p10 scan 1/4 to arduino uno?

thank u

pshanischara commented 7 years ago

Hey, You can the configuration of the connection from adfruit website

-Regards

On Sun, Feb 26, 2017 at 9:55 PM, laundryjuara2016 notifications@github.com wrote:

hi,

anyone can tell me how to wire rgb p10 scan 1/4 to arduino uno?

thank u

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/adafruit/RGB-matrix-Panel/issues/4#issuecomment-282567480, or mute the thread https://github.com/notifications/unsubscribe-auth/ATEaIP-wpMTBIxBDLRm1_rNWuaNkTa06ks5rgadrgaJpZM4Af6s7 .

laundryjuara2016 commented 7 years ago

I have to do that, but its no succes. I used wire from github adafruit , but its for 1:8 not for 1:4 scan, so my experiment not succes.

Can you send me where is the link? Thanks u

pshanischara commented 7 years ago

Sorry i m not aware of it.

On Mon, Feb 27, 2017 at 1:21 PM, laundryjuara2016 notifications@github.com wrote:

I have to do that, but its no succes. I used wire from github adafruit , but its for 1:8 not for 1:4 scan, so my experiment not succes.

Can you send me where is the link? Thanks u

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/adafruit/RGB-matrix-Panel/issues/4#issuecomment-282650293, or mute the thread https://github.com/notifications/unsubscribe-auth/ATEaIDBe0FJkeMOwgGEBSpE2IGJMIpOQks5rgoB4gaJpZM4Af6s7 .

laundryjuara2016 commented 7 years ago

Or you have other refference link?

FabriTEA commented 7 years ago

if anyone is still interested i've forked the libraries to support multiple inline 16x32 panels. https://github.com/FabriTEA/RGB_Matrix_Panel_16xMultiple

casaservice commented 7 years ago

hello FabriTEA your code won't work for 3 led matrix the maximum is two led matrix of 16 * 32 when i connecte three led matrix and i change the n constant to 3 the code won't work for me

FabriTEA commented 7 years ago

@casaservice i'll look into it today! ;) Thanks!

Sab78 commented 6 years ago

Hello FabriTEA your code work for 2 led matrix of 64 32 1/16 scan? And 16 32 matrices with scanning 1/4 are supported?

protonmaster commented 6 years ago

Hi

I no longer support this code.

Cheers


Quantum Entanglement; Faster than light Information Transfer, Experiment http://www.nature.com/news/2008/080813/full/news.2008.1038.html:

The experiment shows that in quantum mechanics at least, some things transcend space-time, says Terence Rudolph, a theorist at Imperial College London. It also shows that humans have attached undue importance to the three dimensions of space and one of time we live in, he argues. “We think space and time are important because that’s the kind of monkeys we are.”

Nature Magazine http://www.nature.com/news/2008/080813/full/news.2008.1038.html

On Sat, Dec 16, 2017 at 12:30 AM, Sab78 notifications@github.com wrote:

Hello FabriTEA your code work for 2 led matrix of 64 32 1/16 scan? and 16 32 matrices with scanning 1/4 are supported

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/adafruit/RGB-matrix-Panel/issues/4#issuecomment-351983684, or mute the thread https://github.com/notifications/unsubscribe-auth/AExjfLNy9Vfyc60VSf4uJ5sY3gnuyC9cks5tAlhigaJpZM4Af6s7 .

yoeckoe commented 6 years ago

for 16*32 matrices with 1/4 scan rate you can use this mod RgbPanelMatrix library https://forum.arduino.cc/index.php?topic=503416.0

marcmerlin commented 5 years ago

If you can run on Teensy or ESP32, you can chain panels with SmartMatrix all the way to 128x128. https://github.com/marcmerlin/SmartMatrix_GFX offers a GFX compat layer on top of SmartMatrix so that you don't have to change your code.

jtejeda1 commented 5 years ago

for 16*32 matrices with 1/4 scan rate you can use this mod RgbPanelMatrix library https://forum.arduino.cc/index.php?topic=503416.0

Hey i would like to know how can i change the library to support 32*32 chained matrices please if you can tell me or edit it

protonmaster commented 5 years ago

Hi,

I am no longer supporting this project

Thanks

On Sun, Jan 27, 2019 at 8:42 PM jtejeda1 notifications@github.com wrote:

for 16*32 matrices with 1/4 scan rate you can use this mod RgbPanelMatrix library https://forum.arduino.cc/index.php?topic=503416.0

Hey i would like to know how can i change the library to support 32*32 chained matrices please if you can tell me or edit it

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/adafruit/RGB-matrix-Panel/issues/4#issuecomment-457896462, or mute the thread https://github.com/notifications/unsubscribe-auth/AExjfJScyUUhbRhnrUujZatAFhDOV3e5ks5vHVhygaJpZM4Af6s7 .

marcmerlin commented 5 years ago

@jtejeda1 please look at https://github.com/marcmerlin/SmartMatrix_GFX and https://github.com/pixelmatix/SmartMatrix for a library that supports chained panels

PaintYourDragon commented 5 years ago

@jtejeda1 You can chain two 32x32 panels by passing a width value of 64 to the constructor (a 64x32 panel is functionally the same as two 32x32 panels). But that's as far as it goes. More flexible chaining support is theoretically possible but would require a complete do-over of the library, it's an extremely non-trivial change.

I'll second the recommendation to use the SmartMatrix library if you're able to work with Teensy. It really wrings every bit of performance out of that device!

luftaquila commented 5 years ago

@FabriTEA Hello I'm getting same issue that your code doesn't works more than two panels. Is there any solution for this? Thank you a lot.

marcmerlin commented 5 years ago

@PaintYourDragon SmartMatrix also works well enough with ESP32 nowadays. I currently use it for 64x32x3 (i.e 64x96) without issues. https://community.pixelmatix.com/t/new-smartmatrix-gfx-based-shirt/405/2 for an example It is pretty memory hungry on ESP32 though due to multiple buffers used for DMA pushes, so if you need much higher resolution, teensy 3.6 is indeed the best chip (it will go all the way to 128x128 although with a slightly compromised refresh rate).

vydarenyj commented 5 years ago

Some library for Arduino uno chain, pleas more than two pannels , works only two 32x16 (64x16) chained from @FabriTEA if i try use more panel is black Thanx

luftaquila commented 5 years ago

@vydarenyj I see that the problem is lack of UNO's memory. Since the flash memory of UNO is usually 32KB, it is not enough to control more than 2 panels. You can check it by print free memory through serial monitor.