I have read http://arduino.cc/forum/index.php/topic,97455.0.html and will try to describe my issue as clearly as possible.
Goal: To create a WS2801 based Christmas LED light show of awesomeness that responds to an IR controller. You press a number on the controller and a different lightshow will appear.
I currently have a lightshow working that is a single set of display sequences. Now, I want to expand it to support multiple sets of display sequences (for the IR controller, which I already have working).
A single sequence could be:
- move 8 red LED's down the strip
move 8 green LED's down the strip
move 8 blue LED's down the strip
move 8 white LED's down the strip
have all 32 LED's pulse red 5 times
struct SEQ {
int seqtype; // Which sequence we use
int seqnum; // Number of times to use it
int seqdel; // Delay between each use
};
SEQ mysequence [] = { {1, 2, 3}, {4, 5, 6}, {7, 8, 9}};
void setup() {
Serial.begin(9600);
Serial.println(mysequence[1].seqdel); // this should return a 6
}
void loop() { }
The above works, but I want to have something that allows me to define multiple sets of sequences, such as:
mylist[0].mysequence[1].seqdel;
I've been Googling and have tried several code variants, but haven't got it yet and would appreciate suggestions.