This is kind of hard to put into words exactly, '
What i would like to be able to do, is in one function, choose which function each zone will use, So that in this example, functionZone1 could be either blink(), dance(), or show() depending on what the user selected, the same thing for each zone.
Then, in another function, call a function with a variable.
I know this code won't work, but is it possible to something like this or should I head a different route (As i was typing this I came across a few problems with approaching it this way, but i'd still like to know if this is possible)...
void whichFunction();
{
functionZone1 = blink();
functionZone2 = dance();
functionZone3 = show();
functionZone4 = show();
}
void LEDshow() {
for(int i = 0; i < LEDSinZONE1; i++) {
functionZone1;
leds[i] = value returned from blink() function, for each i
}
for(int i = LASTzone1Pixel; i < LASTzone2Pixel; i++) {
functionZone2;
leds[i] = value returned from dance() function, for each i
}
for(int i = (LASTzone2Pixel); i < (LASTzone3Pixel); i++) {
functionZone3;
leds[i] = value returned from show() function, for each i
}
for(int i = (LASTzone3Pixel); i < ( LASTzone4Pixel); i++) {
functionZone4;
leds[i] = value returned from show() function, for each i
}
}