32x32 LED Matrix
Moderators: adafruit_support_bill, adafruit

32x32 LED Matrix

by wonderroom on Wed Nov 28, 2012 2:48 pm

We have just received our 32x32 LED matrix, and it seems to have a different configuration to the one on your website, and documentation. Our Matrix has only 2 2x8 pins on the back whereas the old one detailed in all your documentation has 4. The pins on the right say output near them, so I am guessing that the left is used solely for input, however all the instructions you provide at (http://ladyada.net/products/rgbledmatrix/) is based on this previous 4 2x8 pin model. Is there a different wire configuration on this updated board?

Old configuration:
http://www.adafruit.com/images/large/rg ... ck_LRG.jpg

Our configuration:
http://i.imgur.com/E6ziy.jpg


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

Re: 32x32 LED Matrix

by adafruit on Thu Nov 29, 2012 12:11 pm

huh! well luckily its HUB75 which is the same as the 16x32 - can you try wiring up AS IF it were a 16x32 and see if that works? only one half will display, but please let us know if you see colors and such
User avatar
adafruit
 
Posts: 11708
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

Re: 32x32 LED Matrix

by wonderroom on Thu Nov 29, 2012 12:46 pm

Hi, yeah I have done this already, I get two strips that work, as can be seen in this picture:

http://i.imgur.com/TrNJf.jpg

This works nicely using the code for the 16x32 plasma(as shown in the picture), and does exactly the same with the code for 32x32, but with a less defined image.

I imagine something needs to be done about the code maybe? Also the wiring is quite different as the 16x32, for example the LAT being in analogue rather than digital and having 2 RGBs into the same device and no D cable.
wonderroom
 
Posts: 13
Joined: Wed Nov 28, 2012 2:36 pm

Re: 32x32 LED Matrix

by adafruit on Thu Nov 29, 2012 3:44 pm

thanks, we -think- its likely that its two 16x32's in a row.
we'll see if we can adapt the code for this - please hold on it may take a few days to rewrite the library to support it
User avatar
adafruit
 
Posts: 11708
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

Re: 32x32 LED Matrix

by pburgess on Thu Nov 29, 2012 6:57 pm

I won't have one of the new matrices in-hand for a few days yet...but I do have a hunch what's going on.

The 16x32 matrix connector had four pins connected to ground (see attached photo). I'd wager one of these has since been repurposed as a 'D' address select line. If you have a meter or continuity tester, check to see if one of these four pins is no longer connected to the others...and if that's the case, it's very likely the 'D' pin. If so, you could either juggle the wiring around to match the 32x32 example code, or just change around the #defines at the top of the 32x32 code, and it might work at that point.

inputidc.jpg
inputidc.jpg (142.51 KiB) Viewed 2674 times
User avatar
pburgess
 
Posts: 2668
Joined: Sun Oct 26, 2008 2:29 am

Re: 32x32 LED Matrix

by adafruit on Fri Nov 30, 2012 12:10 pm

just checked with a meter - the pin to the right of C is D

so you can rewire it using the two diagrams - let us know if that works!
User avatar
adafruit
 
Posts: 11708
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

Re: 32x32 LED Matrix

by wonderroom on Sat Dec 01, 2012 7:37 pm

Cheers, will try this first thing on monday morning!
wonderroom
 
Posts: 13
Joined: Wed Nov 28, 2012 2:36 pm

Re: 32x32 LED Matrix

by wonderroom on Mon Dec 03, 2012 8:36 am

Hi,

Yes thanks that worked, however I did notice that the plasma 32x32 was a bit slow and jittery, do you think this is due to the lack of power of the Arduino Uno, or do you know of a fix for this?


If anyone else is having similar problems, the fix was as stated above; using the pin set up of the 16x32, but instead of the ground pin opposite using D which is put into A3, and the LAT is then moved to Digital 10.

Here is the code that I wrote to replace the header within any of the 32x32 examples or sketches:

#define CLK 8
#define OE 9
#define LAT 10
#define A A0
#define B A1
#define C A2
#define D A3

RGBmatrixPanel matrix(A, B, C, D, CLK, LAT, OE, false);
wonderroom
 
Posts: 13
Joined: Wed Nov 28, 2012 2:36 pm

Re: 32x32 LED Matrix

by pburgess on Mon Dec 03, 2012 12:40 pm

The 32x32 plasma is indeed slow and jittery. Partly a lack of processing power with the Arduino, and partly because there isn't enough RAM to double-buffer the animation.
User avatar
pburgess
 
Posts: 2668
Joined: Sun Oct 26, 2008 2:29 am

Re: 32x32 LED Matrix

by wonderroom on Thu Dec 13, 2012 7:17 am

Hi, thanks for the help, I have successfully got this working well on the Arduino Uno board.

I am just trying out the new Arduino Due board, and have run into some issues with the code. I am getting an error when compiling the test code on any of the RGBLEDMatrix example sketches, the error is:

"route directory/Arduino/libraries/Adafruit_GFX/glcdfont.c:1: fatal error: avr/io.h: No such file or directory
compilation terminated."

or on the plasma example:
"plasma_32x32.pde:6: fatal error: avr/pgmspace.h: No such file or directory
compilation terminated."

This issue only occurs when Arduino IDE (v 1.5.1) is set (tools>board>Arduino Due (programming port)) to the Due. But when set to the Arduino Uno it works fine and doesn't throw any errors.

Do you have any idea why this would be occurring? And what I can do to fix it?

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

Re: 32x32 LED Matrix

by wonderroom on Thu Dec 13, 2012 9:03 am

I have found all the avr files and just chucked them into the Adafruit_GFX folder, which may not be the right thing to do but it has removed the errors, however now when trying to compile it, there seems to be an error with the actual code it throws this error:

plasma_32x32.pde: In function 'void loop()':
plasma_32x32:90: error: cast from 'int8_t*' to 'uint16_t' loses precision
plasma_32x32:91: error: cast from 'int8_t*' to 'uint16_t' loses precision
plasma_32x32:92: error: cast from 'int8_t*' to 'uint16_t' loses precision
plasma_32x32:93: error: cast from 'int8_t*' to 'uint16_t' loses precision

I have absolutely no idea what I am doing at the moment, I am just playing round with the code, but have had no luck at the moment! Any ideas on how to get this to work with the Arduino Due?

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

Re: 32x32 LED Matrix

by pburgess on Thu Dec 13, 2012 3:25 pm

I'm afraid it's just not going to work with the Arduino Due, not right now, as written.

In order to get decent speed on the "classic" 8-bit Arduinos, the library uses inline assembly and accesses I/O port registers directly (i.e. no digitalWrite(), which would be portable but slow). Unfortunately, this makes it rather deeply tied to the hardware, it's not going to compile and run on the Due at all, which uses a completely different kind of processor architecture, altogether.

A new library specifically for the Due has been discussed...it's on the radar...but there's no work done on this yet and no ETA when it might happen.
User avatar
pburgess
 
Posts: 2668
Joined: Sun Oct 26, 2008 2:29 am

Re: 32x32 LED Matrix

by wonderroom on Thu Jan 03, 2013 8:59 am

Hi,

I am currently having an issue trying to use other libraries and code to and then display data on the Matrix, I have isolated the problem to this String declaration:

String weblocal = "/~evansch1/arduinoadmin/fbconn.php?uid=" + uid + " HTTP/1.0"

If this line is commented out the display works and displays a test data, but if this line is in then the 32x32 matrix does not display anything. Even when the line has no relevance to anything else it still stops the matrix from working; for example see this code below which works fine if that string does not work.



Code: Select all | TOGGLE FULL SIZE
// Ethernet Libraries
#include <Ethernet.h>
//#include <SPI.h>
// LED Matrix Libraries.
#include <Adafruit_GFX.h>   // Core graphics library
#include <RGBmatrixPanel.h> // Hardware-specific library
////////////////////////////////////////////////////////////////////////
// Matrix Pin Layout:
#define CLK 8 
#define OE  9
#define LAT 10
#define A   A0
#define B   A1
#define C   A2
#define D   A3
RGBmatrixPanel matrix(A, B, C, D, CLK, LAT, OE, false);
////////////////////////////////////////////////////////////////////////
//Variable Set Up:
String tempValue;
String pageValue;
String uid = "wonderroomarduino"; // Arduinos Unique ID Goes here!

////////////////////////////////////////////////////////////////////////
//CONFIGURE
////////////////////////////////////////////////////////////////////////
byte server[] = { 173,254,28,46 }; //ip Address of the server you will connect to

// if need to change the MAC address (Very Rare)
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
////////////////////////////////////////////////////////////////////////


void setup() {
  //The location to go to on the server
  //make sure to keep HTTP/1.0 at the end, this is telling it what type of file it is
  //String weblocal = "/~evansch1/arduinoadmin/fbconn.php?uid=" + uid + " HTTP/1.0";
  matrix.begin();
  matrix.setCursor(4, 12);    // start at top left, with one pixel of spacing
  matrix.setTextSize(1);     // size 1 == 8 pixels high
  matrix.setTextWrap(false); // Don't wrap at end of line - will do ourselves

  matrix.setTextColor(matrix.Color333(7,7,7));
  matrix.println("test");
}

void loop(){
 
}
wonderroom
 
Posts: 13
Joined: Wed Nov 28, 2012 2:36 pm

Re: 32x32 LED Matrix

by adafruit_support_rick on Thu Jan 03, 2013 10:21 am

The String object takes up a lot of SRAM. You're running out of available SRAM, and that's why the code fails.

Try recoding to use a plain char array instead.

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

Re: 32x32 LED Matrix

by pburgess on Thu Jan 03, 2013 10:25 am

Almost certainly memory related. The display buffer for the 32x32 matrix uses 1.5K of the Arduino's 2K of RAM. After other libraries stake their claim, on a good day there might be 100-200 bytes free.

Though it won't address every situation, the usual solution is to move as much data as possible to program memory.
http://arduino.cc/en/Reference/PROGMEM
User avatar
pburgess
 
Posts: 2668
Joined: Sun Oct 26, 2008 2:29 am