help with buttons switching with number of pushes

my programming level is still pretty low at this point, but thanks for the help Ron! I've been doing my best with a few bits and bobs here and there along with several youtube videos. but that helped me out a ton! :slight_smile:
i'm gonna dissect the code you provided and try and wrap my head around what i was doing wrong.
(wrong approach probably).
I do have a question about how the "lighter" and "case" aspect of the code came to be and what those actually do..
sorry if that's a dumb question...

i just did some research before posting what i have written and may have answered my own question.
"case" = a function and "lighter" is just the label you chose?
you may have just opened my eyes to a new world of functions! lol
Thanks again!

switch (buttonPushCounter) {                                         //depending on counter value choose a case
      case 0:
        Lighter(0,0,0);
        break;
      case 1:
        Lighter(1,0,0);
        break;
      case 2:
        Lighter(1,1,0);
        break;
      case 3:
        Lighter(1,1,1);
        break;
      case 4:
        Lighter(0,1,1);
        break;
      case 5:
        Lighter(0,1,0);
        break;
      case 6:
        Lighter(0,0,1);
        break;
      case 7:
        Lighter(1,0,1);
        break;
    }
    buttonPushCounter++;                                                 //increment counter by one
  }