Go Down

Topic: LED Matrix - animation pattern (Read 3609 times) previous topic - next topic



in my little LED Coffee-Table project, I´d like to integrate some cool animations.
The very most threads show a specified matrix for a special case. (Clock, running text, equalizer, ect.)

So I´m looking for some animaton patterns, to run them one after another. The library or LED type, should be unimportant.
What do I expect?
Some waves, circles or rectangles running over the matrix. Calculate some spectrals and produce some nice outputs.

For example a very simple ambiente-light which is fading very slow:
Code: [Select]

LEDPixels LP;
int MyDisplay[100];
byte r,g,b;
int moveSpeed = 300;
void Ambiente()
  //Fade through random colors
  byte tr,tg,tb;
  tr = random(0,31);
  tg = random(0,31);
  tb = random(0,31);
  FadeLED(20, moveSpeed, r,g,b, tr,tg,tb);
  r = tr;
  g = tg;
  b = tb;

void FadeLED(int steps, int fadedelay, byte red1, byte green1, byte blue1, byte red2, byte green2, byte blue2)
  for (int  fadindex = 0;  fadindex < steps+1;  fadindex++)
    LP.setRange(0,99,LP.color((red1 * (steps -  fadindex) + red2 *  fadindex)/steps,
    (green1 * (steps -  fadindex) + green2 *  fadindex)/steps,
    (blue1 * (steps -  fadindex) + blue2 *  fadindex)/steps)); 

Or a matrix, which seems to float like in the movie:
Code: [Select]
int MatrixColor = LP.color(0,31,0); //Green
void setup() {
  LP.initialize(20, &MyDisplay[0],100, 8, 7 );  //Frequence, address of display, no of leds,clock (green), data (yellow)
void TheMatrix()


//Create new points in the first row. Probability to set it coloured: 1/3rd
void DrawMatrixHeader()
  for(int i = 0; i < LP.gridWidth;i++)
    MyDisplay[LP.Translate(i,9)] = random(2,4)%2 == 0 ? LP.color(0,0,0) : MatrixColor; //Chance of 1/3rd

//Shift Matrixrow down
void ShiftMatrixLines()
  for(byte i = 0; i < LP.gridHeight;i++)
    for(byte j = 0; j < LP.gridWidth;j++)
      MyDisplay[LP.Translate(i,j)] = MyDisplay[LP.Translate(i,j+1)];

In this cases I´m using a Bliptronics 8mm LED chain. So the "MyDisplay" Array represents the Matrix like this:
8 3 2
7 4 1
6 5 0
The function "LP.Translate" from the <LEDPixels.h> Library calculates X/Y-Coordinates to the chain.

I hope that we can collect some animations here, which easyly can be translated to any other matrix.


Aug 16, 2011, 11:53 pm Last Edit: Sep 07, 2011, 10:26 pm by Trib Reason: 1
To show what I mean and to introduce my table:


EDIT: However a YT video is embedded correctly  :smiley-roll-sweat:


And a little Snake game:


Poorly the LED´s are to bright for my camera. In reality it looks more clear ans smooth.
The speed can be controlled by a poti or raised by every "apple".


Very nice!
Just opening this back up as you were kind enough to reply on another thread and I think this is a great idea.
What about one, or several, bouncing balls that collide with the edges and maybe even each other.
I thought I'd start you off with something really easy.....  ]:D

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131