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

Panel ceases to function properly if more then 30 characters are printed using Serial.print() #20

Closed needmoreram closed 9 years ago

needmoreram commented 9 years ago

I have a 32x32 matrix connected to an Arduino Uno (running firmware rev. 0001). I loaded up the example colorwheel_progmem_32x32 and made the following change:

  45   matrix.begin();
+ 46 
+ 47   Serial.begin(115200);
+ 48   matrix.dumpMatrix();
  49 }

However, upon running this, the LEDs simply start behaving in a seemigly random fashion (like what you would see on the panel when a program is being loaded onto the Uno). Further calls to draw functions don't have any effect.

I did some debugging and discovered that upon commenting out these lines in RGBmatrixPanel.cpp, the issue disappears.

383   Serial.print("\n\n"
384     "#include <avr/pgmspace.h>\n\n"
385     "static const uint8_t PROGMEM img[] = {\n  ");
PaintYourDragon commented 9 years ago

Resolved in latest commit. Strings were relocated to flash memory.

Good eye, thanks for spotting this.