jhanarato / functimer

A Functional Timer (Arduino project)
GNU General Public License v3.0
0 stars 0 forks source link

Implement session timer #3

Closed jhanarato closed 8 years ago

jhanarato commented 8 years ago

This is the raison d'être of this device:

  1. The timer starts.
  2. The timer runs either for a long time or a short time based on the state of a toggle switch.
  3. The timer is switched off or
  4. The time set elapses.
  5. 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.

jhanarato commented 8 years ago

The timer works after the work done on #23.