Hello everyone, I can't seem to get my basic code to stop looping.
I'm working on a countup timer that starts and stops with an Adafruit Breakbeam IR Sensor.
Right now I'm not worried about getting a colon to display or getting hours and minutes or even worried about a reset button.
I want the counter to start on the first break of the IR sensor, and then stop at the second break.
I am using an Arduino UNO, TM1637 7-Segment LED display, and an Adafruit Breakbeam IR Sensor with the Bounce2.h and TM1637.h libraries.
I have attached my code for anybody's perusal, the code starts just fine with the LED display off and the debouncer catches the instant the beam is broken and starts the clock.
What I can't seem to do is figure out how to get the counter to stop and display the count that was reached upon the stop.
I'm new to coding, but i have worked through 2 introduction books from Vilros and the official Arduino introduction book.
Any help with creating a function to stop the count and display the count would be greatly appreciated, thank you for your help.