32x32 LED Matrix
Moderators: adafruit_support_bill, adafruit

Re: 32x32 LED Matrix

by woohaeng on Mon Jan 07, 2013 9:41 am

Hello!

Do you have more give it to free up memory?
Reduce the value below, meaning there any? (3 -> 1)

Code: Select all | TOGGLE FULL SIZE
  // Allocate and initialize matrix buffer:
  int buffsize  = 32 * nRows * 1, // x3 = 3 bytes holds 4 planes "packed"


Receives data to the serial port must be displayed in a matrix, which is unable to solve the problem of memory.
Let me know how memory can be obtained. :(
woohaeng
 
Posts: 1
Joined: Mon Jan 07, 2013 9:28 am

Re: 32x32 LED Matrix

by pburgess on Tue Jan 08, 2013 5:59 pm

Hi there,

No, you can't reduce the memory usage in the library...every pixel of the display must be accounted for.

It should be just possible to handle serial input and the LED matrix together, but you will need to be super careful with memory elsewhere. Places to look are library #includes (Wire.h is pretty memory-hungry) and your own program variables, especially strings (which should instead be placed in PROGMEM).
User avatar
pburgess
 
Posts: 2703
Joined: Sun Oct 26, 2008 2:29 am

Re: 32x32 LED Matrix

by wonderroom on Wed Jan 09, 2013 7:05 am

Hi,

Thanks for this, I have been able to sort this out and it's working fine for the Strings, however now when getting to the creation of the Ethernet class EthernetClient object it is failing, and I cannot find a way to get around this in the same way as the String, is it possible to have the Arduino Ethernet shield running with the Matrix?

Thanks
wonderroom
 
Posts: 13
Joined: Wed Nov 28, 2012 2:36 pm

Re: 32x32 LED Matrix

by wonderroom on Wed Jan 09, 2013 9:36 am

Hi,

I just went out today and bought an Arduino Mega as I thought the only real issue seems to be the SRAM at the moment, as it didn't work, I am just noticing some mentions of a different wiring layout for the mega (like here viewtopic.php?f=47&t=25955) where it mentions a new wiring digram will be released for it soon, do you know if this diagram is available now?

Cheers
Chris
wonderroom
 
Posts: 13
Joined: Wed Nov 28, 2012 2:36 pm

Re: 32x32 LED Matrix

by pburgess on Wed Jan 09, 2013 5:13 pm

Oh! Ethernet! Heck yeah, that library's going to require a TON of RAM. No way to do the 32x32 matrix and Ethernet together on an Uno.

As for the Arduino Mega...I do seem to recall some users getting the matrix working, but whether or not this can also work with the Ethernet shield, I'm not sure. There may be pin conflicts, or there may be timing issues of trying to handle network access and driving the display simultaneously. For pin selection, here's the relevant comments from the RGBmatrixPanel library source:

Code: Select all | TOGGLE FULL SIZE
// Arduino Mega hasn't actually been tested -- use at your own peril!
 // Because digital pins 2-7 don't map to a contiguous port register,
 // the Mega will require connecting the matrix data lines to different
 // pins.  Ports A, C, and L all offer the requisite contiguous 6 bits.
 // I wanted to use PORTL in order to keep the external memory interface
 // free, but accessing the upper PORT registers in assembly seems to
 // require some additional flaming hoops and doesn't work with the
 // inline code here.  PORTA is used instead (Mega pins 22-29, though
 // only 24-29 are actually connected to the LED matrix).  Clock may be
 // any pin on PORTB -- on the Mega, this CAN'T be pins 8 or 9 (these
 // are on PORTH), thus the wiring will need to be slightly different
 // than the tutorial's explanation on the Uno, etc.  Pins 10-13 are all
 // fair game for the clock, as are pins 50-53.
 #define DATAPORT PORTA
 #define DATADIR  DDRA
 #define SCLKPORT PORTB
User avatar
pburgess
 
Posts: 2703
Joined: Sun Oct 26, 2008 2:29 am

Re: 32x32 LED Matrix

by adafruit_support_rick on Wed Jan 09, 2013 6:20 pm

The Ethernet Shield picks up SPI from the ICSP header on the Mega, so there shouldn't be any pinout problems between the shield and the Mega.

Mega pins 50 (MISO), 51 (MOSI), 52 (SCK), 53 (SS) will no longer be fair game, however, as these share the SPI signals with the ICSP header.

adafruit_support_rick
 
Posts: 13111
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: 32x32 LED Matrix

by wonderroom on Fri Jan 11, 2013 8:10 am

Hi,

cheers, got it working on the Mega, and I have been using the wifi rather than ethernet, all working fine until i try and process information on a webpage then it breaks the matrix, I guess because of the RAM again.

Although I am having another different issue, I wanted to ask if there is anything in the libraries to animated objects, for example I have made quite a complicated image made with lines pixels and a rectangle, is there anything in the library for moving something like this across the matrix? I have been trying to create arrays and loops to no avail right now.

Thanks
wonderroom
 
Posts: 13
Joined: Wed Nov 28, 2012 2:36 pm

Re: 32x32 LED Matrix

by adafruit_support_rick on Fri Jan 11, 2013 1:09 pm

There's no animation support in the library. Sorry.

Animation typically requires redrawing the background as the object moves away from it, and then redrawing the object in the new location. Is this what you're having difficulty with?

adafruit_support_rick
 
Posts: 13111
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: 32x32 LED Matrix

by wonderroom on Wed Feb 13, 2013 5:49 am

Hi, Thanks for your help,

Quick question, do you have libraries for this 32x32 display to work with Raspberry Pi?

Thanks
wonderroom
 
Posts: 13
Joined: Wed Nov 28, 2012 2:36 pm

Re: 32x32 LED Matrix

by pburgess on Wed Feb 13, 2013 12:52 pm

We don't, and I'm uncertain if there ever will be, due to timing issues on the Pi.

There might be some hope...I have seen a photo of one bring driven by a Raspberry Pi (I think it was on Google+ maybe?) in a 1-bit-each R/G/B configuration. Just how steady the image is, and whether this can be expanded to multiple bits, I have no idea.
User avatar
pburgess
 
Posts: 2703
Joined: Sun Oct 26, 2008 2:29 am

Re: 32x32 LED Matrix

by wonderroom on Wed Feb 20, 2013 12:23 pm

Ok thanks, will look into it.


One other question, is there some form of freeze state for the 32x32 Matrix?

I am having an issue with the sketch I am developing in which I am displaying some information on the matrix, I then want to connect to a webpage and get a new set of data, keeping the data on the matrix until I have gained the new data, in theory it works fine, however when the arduino tries to get the new set of data from a webpage the matrix goes a bit crazy, with random lines and glitching. The only work around I have managed is to set the entire screen to black before I get the new data, however this then gives me around a 4 second delay with nothing on the screen, which is not ideal. Any fixes that you know of?

Thanks
Chris
Wonder Room
wonderroom
 
Posts: 13
Joined: Wed Nov 28, 2012 2:36 pm

Re: 32x32 LED Matrix

by wonderroom on Mon Feb 25, 2013 8:30 am

Issue fixed,

If anyone else is having similar issues, it was that the pins had to change, this is not just for the ethernet, but also the wifi shield.

As far as I could see pins 10 and 12 cannot be used, so I used 2 and 3 instead.
wonderroom
 
Posts: 13
Joined: Wed Nov 28, 2012 2:36 pm