jhanarato / functimer

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

Switch debounce #7

Closed jhanarato closed 8 years ago

jhanarato commented 8 years ago

The physical toggle switches on the arduino:

https://www.sparkfun.com/products/9276

will bounce like most switches. Calling delay(50) after each call to SwitchPanel::update() seems to suppress any problems. I'm not sure whether to put the debounce delay in SwitchPanel itself, or in the calling code.

jhanarato commented 8 years ago

switches.update() is called in setup() and in loop(). It is not debounced in the first instance. I am going to put the delay into the update() method itself.

jhanarato commented 8 years ago

Done and committed.