Buttons for LED strip only work when held down I am trying to make a 24 button board that assigns different methods to each button. When a button is pressed, it should interrupt the method of the previous button and begin the new method. Currently, the button has to be held down in order to work. I'm not sure why since the methods should continue without being held down. All 24 methods are similar to the one posted below.

loop(){
  if (digitalRead(inPin(5)) == HIGH){
    fifthButtonTheatreChaseRedSlow(strip.Color(127,   0,   0), 100); // Red
  }

void fifthButtonTheatreChaseRedSlow(uint32_t c, uint8_t wait) {
  for (int j=0; j&lt;100; j++) {  //do 100 cycles of chasing
    for (int q=0; q &lt; 3; q++) {
      for (int i=0; i &lt; strip.numPixels(); i=i+3)
      {
        strip.setPixelColor(i+q, c);    //turn every third pixel on
      }
      strip.show();
      delay(wait);

      // give up if switches pressed
      if (digitalRead (inPin(1)) == HIGH || 
             digitalRead (inPin(2)) == HIGH ||
             digitalRead (inPin(3)) == HIGH ||
             digitalRead (inPin(4)) == HIGH || 
             digitalRead (inPin(6)) == HIGH ||
             digitalRead (inPin(7)) == HIGH || 
             digitalRead (inPin(8)) == HIGH ||
             digitalRead (inPin(9)) == HIGH || 
             digitalRead (inPin(10)) == HIGH ||
             digitalRead (inPin(11)) == HIGH || 
             digitalRead (inPin(12)) == HIGH ||
             digitalRead (inPin(13)) == HIGH || 
             digitalRead (inPin(14)) == HIGH ||
             digitalRead (inPin(15)) == HIGH || 
             digitalRead (inPin(16)) == HIGH ||
             digitalRead (inPin(17)) == HIGH || 
             digitalRead (inPin(18)) == HIGH ||
             digitalRead (inPin(19)) == HIGH || 
             digitalRead (inPin(20)) == HIGH ||
             digitalRead (inPin(21)) == HIGH ||
             digitalRead (inPin(22)) == HIGH || 
             digitalRead (inPin(23)) == HIGH ||
             digitalRead (inPin(24)) == HIGH)
               return;

      for (int i=0; i &lt; strip.numPixels(); i=i+3) {
        strip.setPixelColor(i+q, 0);        //turn every third pixel off
      }
    }
  }
}


Not sure if it's a hardware issue or a software issue.
It's a software issue.  You are basically saying "If this button is currently pressed down then run this sequence once", rather than "If this button has transitioned from OFF to ON then set my current sequence to X"

You need to learn about the Finite State Machine and about switching from one state to another (or one selected sequence to another) when a button changes state not when it is in a state.

So basically the whole logic of your program is flawed and needs re-working.