Run a loop until digitalRead detects a HIGH.
Then - digitalRead runs if statement loop. That loop will run for X amount of seconds. Then return to main loop. I cannot use delay commands since I need it to always be open to input even during the timed loop. Ie. While running the second loop, pushing a button can restart that loop.
Is this not possible with a millis variety?If input = high, run loop for x amount of time until time runs out or input = high again. Seems simple, haha.Thanks