There seems to be a conflict between the Arduino RGB Matrix library and the wire.h library. Just including the wire.h file in the sketch will cause the RGB panel to stop working.
Has anyone found this and come up with a work-around to it?
Thanks
Jay
RGB 16x23 matrix with arduino wire.h library
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_mike
- Posts: 67454
- Joined: Thu Feb 11, 2010 2:51 pm
Re: RGB 16x23 matrix with arduino wire.h library
That's a known issue. The Wire library blocks while it waits for the microprocessor to handle the I2C communication, and that would play havoc with the matrix controller's timing.
Your best bet is to use the softI2C libraries instead of Wire: http://code.google.com/p/rtoslibs/downloads/list
Your best bet is to use the softI2C libraries instead of Wire: http://code.google.com/p/rtoslibs/downloads/list
- jsissom
- Posts: 22
- Joined: Thu Aug 18, 2011 9:19 pm
Re: RGB 16x23 matrix with arduino wire.h library
Thanks. This library does pretty much the same thing. As soon as I declare a variable that uses the I2C class, the display stops working.
Before your post, I was starting to write my own I2C library. I was hopeful this would solve it, but it doesn't look like it. Back to debugging.
Before your post, I was starting to write my own I2C library. I was hopeful this would solve it, but it doesn't look like it. Back to debugging.
- pburgess
- Posts: 4161
- Joined: Sun Oct 26, 2008 2:29 am
Re: RGB 16x23 matrix with arduino wire.h library
It's RAM-related, actually. The RGB matrix uses nearly all available memory (little over 200 bytes free, if using double-buffered mode), and the Wire library is HUNGRY.
One solution is to use single-buffered mode, though the display will flicker as it's redrawn.
Another is much more involved. When I needed to interface a realtime clock chip, I wrote a much, MUCH stripped-down library to handle the I2C communications without the big RAM overhead of the standard library for that.
One solution is to use single-buffered mode, though the display will flicker as it's redrawn.
Another is much more involved. When I needed to interface a realtime clock chip, I wrote a much, MUCH stripped-down library to handle the I2C communications without the big RAM overhead of the standard library for that.
- jsissom
- Posts: 22
- Joined: Thu Aug 18, 2011 9:19 pm
Re: RGB 16x23 matrix with arduino wire.h library
I tried the one posted by [email protected] which seems much smaller than wire.h with no success. I'm still working on my own but I'll try to modify the other one (since it works) to see if I can make it take less RAM.
But if RAM is the issue this probably won't help because I would like to drive 2 cascaded displays. Maybe I could strip down the matrix library to handle exactly what I need. Or it might be time for a different CPU.
Thanks
But if RAM is the issue this probably won't help because I would like to drive 2 cascaded displays. Maybe I could strip down the matrix library to handle exactly what I need. Or it might be time for a different CPU.
Thanks
- jerware
- Posts: 25
- Joined: Fri Aug 31, 2012 7:13 pm
Re: RGB 16x23 matrix with arduino wire.h library
I'm trying to do this exact thing. Any chance of you sharing your stripped down library?pburgess wrote:When I needed to interface a realtime clock chip, I wrote a much, MUCH stripped-down library to handle the I2C communications without the big RAM overhead of the standard library for that.
- Captain_LeChuck
- Posts: 84
- Joined: Mon Nov 14, 2011 2:39 pm
Re: RGB 16x23 matrix with arduino wire.h library
I successfully got 3 Uno's talking to each other through I2C. One master and two slave. The two slaves are driving a 16x32 LED matrix each. Def has flickering. I'm going to switch my slaves from Uno's to Mega 2560's and see if that helps. I'll let ya'll know how it goes!
- John
- John
- Captain_LeChuck
- Posts: 84
- Joined: Mon Nov 14, 2011 2:39 pm
Re: RGB 16x23 matrix with arduino wire.h library
It is MUCH better using the Mega 2560. Barely can notice the flicker. I'm going to be animating images on the panel so won't even notice it :)
- John
- John
- Captain_LeChuck
- Posts: 84
- Joined: Mon Nov 14, 2011 2:39 pm
Re: RGB 16x23 matrix with arduino wire.h library
Also, I had to use this library instead of the standard Wire library because it's too heavy and doesn't do well with the matrix library on top of it: https://github.com/todbot/SoftI2CMaster
I'll post my code once the project is finished. It's going to be epic when I'm done!
- John
I'll post my code once the project is finished. It's going to be epic when I'm done!
- John
Please be positive and constructive with your questions and comments.