Hi
I need to make an animation for the mini 8x8 matrix that will last for 4 seconds.
Every 500ms the rows (starting from the bottom) will light up:
500ms: bottoms row lit
1000ms: bottom 2 rows lit
1500ms: bottom 3 rows lit
etc...you get the idea
I hope that makes sense.
I think the way to do this is using a for loop and changing the cursor.
Do I need to use the drawBitmap function? It seems like an overly complicated way to turn a row of leds on
thanks
8x8 matrix animation
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_mike
- Posts: 67446
- Joined: Thu Feb 11, 2010 2:51 pm
Re: 8x8 matrix animation
You've described the two major techniques of handling patterns: generating them procedurally or pulling them from a lookup table.
Both versions work, so the choice usually boils down to which one is most convenient. Procedural pattern generation tends to be more compact, table lookups tend to be more flexible.
In this case, it sounds like your pattern will be easy to generate procedurally, so calling 'millis()' and drawing each frame of the pattern at the appropriate time would probably be the easiest solution.
Both versions work, so the choice usually boils down to which one is most convenient. Procedural pattern generation tends to be more compact, table lookups tend to be more flexible.
In this case, it sounds like your pattern will be easy to generate procedurally, so calling 'millis()' and drawing each frame of the pattern at the appropriate time would probably be the easiest solution.
Please be positive and constructive with your questions and comments.