HOT DAM JML! You did it! That's what i needed. I'm going to go back thru you're code and study that. You're the man. I truly appreciate your help
Quick question, can you tell me how to serial print the name of the case (i.e. ALLoff, HOMERUN,). Right now it just shows 0,1,2... when it goes thru each case
You might run into trouble trying to ++ an enum though, I believe you can do showType = showType + 1; or if that's a bit messy, you can write an operator overload for the ++;
const char* showNames[] = { "ALL_OFF", "HIGHLIGHT", "PATRIOTIC", "BREATH", "HOMERUN"};
enum Shows {
ALL_OFF = 0,
HIGHLIGHT,
PATRIOTIC,
BREATH,
HOMERUN,
NUM_SHOWS
};
Shows showType = ALL_OFF; // Or whatever you want it to be.
void setup() {
Serial.begin(9600);
for (; showType < NUM_SHOWS; showType = showType+1)
Serial.println(showNames[showType]);
}
void loop() {}
void printShowName(int showNumber) {
if (showNumber == ALLoff) Serial.println(F("ALLoff"));
else if (showNumber == HIGHLIGHT) Serial.println(F("HIGHLIGHT"));
else if (showNumber == PATRIOTIC) Serial.println(F("PATRIOTIC"));
else if (showNumber == BREATH) Serial.println(F("BREATH"));
else if (showNumber == HOMERUN) Serial.println(F("HOMERUN"));
else Serial.println(F("Unknown Show"));
}
void startShow(int i) {
printShowName(i); // print the name of the current show
switch (i) {
case ALLoff:
....