Get rid of delay()s as they stop the sketch from running for this time period.
Why didn't you use millis() in this sketch (as in BlinkWithoutDelay BWD)?
24.0 Where 0 is 100ms or 1/10th of a second ![]()
You should always incorporate switch debouncing to handle switch reads.
.