Hi!
I have trying to skip 8x8 led matrix filling loop by button press using mills.
Have searched different options ("NoDelay.h" library, "blink" without delay) but have not success.
So far here is the code snippet:
unsigned long previousMillis = 0;
const long interval = 234;
void fillLedMatrix(){
// Start filling from bottom left
for(int a = 0; a < matrixCount; a++){
for(int r = 0; r < 8; r++){
for(int c = 0; c < 8; c++){
lc.setLed(a, c, r, HIGH);
unsigned long currentMillis = millis();
if (currentMillis - previousMillis >= interval) {
previousMillis = currentMillis;
if(digitalRead(BUTTON1) == LOW) {
drawWordNext();
}
}
}
}
}
}
Led matrix displayed as fully filled