here my coding for RGB LED MATRIX DISPLAY
thanks friend for helping
// 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 OE 9
#define LAT 10
#define CLK 11
#define A A0
#define B A1
#define C A2
#define D A3
// 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, D, CLK, LAT, OE, true, 64); //32X64
//RGBmatrixPanel matrix(A, B, C, CLK, LAT, OE, true); // 16X32
// 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 = "TESTING 32X64 RGB LED Matrix 1234567890&*()1234567890";
const char str1[] PROGMEM = "HELLO";
int textX = matrix.width(),
textMin = sizeof(str) * -12, // CONTROL NO OF TEXT -12 = UNLIMITED
hue = 0;
int8_t ball[3][4] = {
{ 3, 0, 1, 1 }, // Initial X,Y pos & velocity for 3 bouncy balls
{ 17, 15, 1, -1 },
{ 27, 4, -1, 1 }
};
static const uint16_t PROGMEM ballcolor[3] = {
0x0080, // Green=1
0x0002, // Blue=1
0x1000 // Red=1
};
void setup() {
matrix.begin();
matrix.setTextWrap(false); // Allow text to run off right edge , false=LEFT TO RIGHT 1 LINE , TRUE=BOTTOM TO UP AND RUN TO RIGHT
matrix.setTextSize(1); // SIZE OF TEXT =1 SMALL , 2/3/4/5 BIG
}
void loop() {
byte i;
// Clear background
matrix.fillScreen(0);
// Bounce three balls around
for(i=0; i<3; i++) {
// Draw 'ball'
matrix.fillCircle(ball[i][0], ball[i][1], 5, pgm_read_word(&ballcolor[i]));
// Update X, Y position
ball[i][0] += ball[i][2];
ball[i][1] += ball[i][3];
// Bounce off edges
if((ball[i][0] == 0) || (ball[i][0] == (matrix.width() - 1)))
ball[i][2] *= -1;
if((ball[i][1] == 0) || (ball[i][1] == (matrix.height() - 1)))
ball[i][3] *= -1;
}
// Draw big scrolly text on top
matrix.setTextColor(matrix.ColorHSV(hue, 255, 255, true)); // MULTICOLOR
//matrix.setTextColor(matrix.Color333(7,7,7)); //SINGLE COLOR
matrix.setCursor(textX, 1);
matrix.print(F2(str)); // TEXT LINE 1
matrix.setCursor(textX, 8);
matrix.print(F2(str1)); // TEXT LINE 2
// Move text left (w/wrap), increase hue
if((--textX) < textMin) textX = matrix.width(); //textMin
hue += 7; // CONTROL COLOR CHANGE SPEED
if(hue >= 1536) hue -= 1536; //CONTROL COLOR CHANGE SPEED
// Update display
matrix.swapBuffers(false);
}