The timer runs either for a long time or a short time based on the state of a toggle switch.
The timer is switched off or
The time set elapses.
The time indicates the end of the session with a LED effect and (depending on the state of another toggle) a beep from a piezo buzzer.
The set time can be one of two hard coded values and is set by a toggle switch. This switch can change state after the timer has been started and before it is done. Changing from long to short when the short period is up should cause the device to do 5.
I have already created a Timer class that allows multiple timers to exist. At this time I have a nice LED fade effect that would normally done using the Arduino delay() function. However, in order to interrupt the fade effect when the timer toggle is switched off, I use the more complicated Timer class which checks how much time has passed using the Arduino millis() function.
This is the raison d'être of this device:
The set time can be one of two hard coded values and is set by a toggle switch. This switch can change state after the timer has been started and before it is done. Changing from long to short when the short period is up should cause the device to do 5.
I have already created a
Timer
class that allows multiple timers to exist. At this time I have a nice LED fade effect that would normally done using the Arduinodelay()
function. However, in order to interrupt the fade effect when the timer toggle is switched off, I use the more complicatedTimer
class which checks how much time has passed using the Arduinomillis()
function.