Go Down

Topic: Smooth animation with an 8x8 RGB LED matrix (Read 25 times) previous topic - next topic


Hello giladaya,

this really looks great. I was searching for some nice Matrix Animations and started a thread, which was not very succesful
LED Matrix - animation pattern.
I´ll try to port your code to my matrix and go on collecting some nice effects :)

Some time ago I wrote a .NET program which can demonstrate matix animations on a PC. Maybe I´ll release it to make it easier to create some new effects.



Mar 02, 2013, 03:46 pm Last Edit: Mar 04, 2013, 12:47 pm by Helmuth Reason: 1
Respect, well done! Good presentation, too.

I can imagine, that it would look great on a huge indirect working matrix (so, that you just see the projection at a wall) with powerful LED strip elements...

edit, next day:

I have to test that with a serious output device...  ;)


This looks great!

Once my 8x8 matrix arrives, I'd like to try to adapt it as an interactive nightlight, where new particles would be triggered if a PIR motion detector is triggered while ambient light is low. I was thinking I might be able to accomplish this by updating your "Flame.ino" example (https://github.com/giladaya/arduino-particle-sys/blob/master/examples/Flame/Flame.ino). In that example, some of the parameters for the particle system are established in Setup:
Code: [Select]
source.x = 112;  
source.y = 1;  
Emitter_Fountain::minLife = 20;  
Emitter_Fountain::maxLife = 80;  
Particle_Std::ay = 1;

I was thinking that I could add some lines to Loop that would adjust these continuously. For instance:
Code: [Select]
if (triggerPin == HIGH && ambientLight <= lightThreshold) {      //assuming these are all defined elsewhere...
  Particle_Std::ay = 1;
else { Particle_Std::ay = 0; }

I expect this would leave the particles at the bottom of the display most of the time, but then they'd shoot up when the PIR is triggered in the dark.
Any ideas or suggestions for a more elegant implementation, or smarter usage of the library? Thanks! I'm looking forward to experimenting with this.


@giladaya: Could it be, that you swapped columns and rows ( width and height) in you code?
I'm currently trying to port your "fire"-code to a WS2812 LED strip with 6 columns ( 6 pixel width) and 8 rows (8 pixel hight).

As I understand your code, the function "generateline()" creates a new pixel-line on the bottom line of the matrix. But your code says:
Code: [Select]

* Randomly generate the next line (matrix row)
void generateLine(){
  for(unsigned char x=0;x<ColorduinoScreenHeight;x++) {
      line[x] = random(64, 255);

So you are using "x" for the position of the "cursor" on the line, but you use the ColorduinoScreenHeight as upper border.
This is not a problem, as long as you use this nomenclature consistently and yout matrix has exactly the same number of rows and columns.
Problems start if the number of columns and rows differ.
Another point is the declaration of the mask-Arrays (valueMask[ColorduinoScreenWidth][ColorduinoScreenHeight] and hueMask[ColorduinoScreenWidth][ColorduinoScreenHeight])



(mezzi a disposizione)*(intelligenza)= K (costante)

Go Up