Go Down

Topic: Full color matrix 96*16 3 panels (32*16) (Read 2568 times) previous topic - next topic

AWOL

Yes, actually, I just want a text that runs through 3 Panels.
And I've told you that you've made some bad choices.
So, now is the time to compromise.
Do you want to
A) reduce the number of colours?
B) reduce the smoothness of the animation?
C) pick a better-suited processor?

MCLED


MCLED

Code: [Select]
// scrolltext demo for Adafruit RGBmatrixPanel library.
// Demonstrates double-buffered animation on our 16x32 RGB LED matrix:
// http://www.adafruit.com/products/420

// Written by Limor Fried/Ladyada & Phil Burgess/PaintYourDragon
// for Adafruit Industries.
// BSD license, all text above must be included in any redistribution.

#include <Adafruit_GFX.h>   // Core graphics library
#include <RGBmatrixPanel.h> // Hardware-specific library

// Similar to F(), but for PROGMEM string pointers rather than literals
#define F2(progmem_ptr) (const __FlashStringHelper *)progmem_ptr

#define CLK 8  // MUST be on PORTB! (Use pin 11 on Mega)
#define LAT A3
#define OE  9
#define A   A0
#define B   A1
#define C   A2
// Last parameter = 'true' enables double-buffering, for flicker-free,
// buttery smooth animation.  Note that NOTHING WILL SHOW ON THE DISPLAY
// until the first call to swapBuffers().  This is normal.
RGBmatrixPanel matrix(A, B, C, CLK, LAT, OE, true);
// Double-buffered mode consumes nearly all the RAM available on the
// Arduino Uno -- only a handful of free bytes remain.  Even the
// following string needs to go in PROGMEM:

const char str[] PROGMEM = "TEST 1";
int    textX   = matrix.width(),
       textMin = sizeof(str) * -12,
       hue     = 0;

void setup() {
  matrix.begin();
  matrix.setTextWrap(false); // Allow text to run off right edge
  matrix.setTextSize(2);
}

void loop() {
  byte i;

  // Clear background
  matrix.fillScreen(0);


  // Draw big scrolly text on top
  matrix.setTextColor(matrix.ColorHSV(hue, 255, 255, true));
  matrix.setCursor(textX, 1);
  matrix.print(F2(str));

  // Move text left (w/wrap), increase hue
  if((--textX) < textMin) textX = matrix.width();
  hue += 7;
  if(hue >= 1536) hue -= 1536;

  // Update display
  matrix.swapBuffers(false);
}


Now I use this sketch, it takes only 9.084 bytes (28%).
What code do I need to run over 3 panels?

AWOL

Quote
Now I use this sketch, it takes only 9.084 bytes (28%).
It only take 9084 bytes of program (flash) memory.
How much RAM does it consume when running?

Again, I draw your attention to this
Code: [Select]
// Double-buffered mode consumes nearly all the RAM available on the
// Arduino Uno -- only a handful of free bytes remain.

MCLED

There is no jumping balls any more, I think it will takes less memory or not?
only a crolling text. I ask you for the code for more panels.

AWOL

I don't have one panel.
I am unlikely to buy one, and I don't have the library, but if the comment tells you that the Uno barely has enough RAM to run one panel, then you (emphasis required) need to be looking for a new library or a new processor.

Go Up