Ive been really struggling recently with one problem.
The problem is that I cannot find a way to make one button trigger one sequence on an 8x8 display for 10 seconds an
The problem is delay(50);
. The arduino does not check the input pins during these 50 milliseconds, and it's likely when you are pressing a button. You can either attach an interrupt function when the button is pressed (https://www.arduino.cc/reference/en/language/functions/external-interrupts/attachinterrupt/). Or you could try a looped delay like so:
unsigned int startTime = millis();
unsigned int currentTime = startTime;
while(currentTime - startTime >= 50) {
// check button state
currentTime = millis();
}
https://www.arduino.cc/en/Tutorial/StateChangeDetection
From the code you posted it appears you don't need delay(50);
at all.