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.
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.
The physical toggle switches on the arduino:
https://www.sparkfun.com/products/9276
will bounce like most switches. Calling
delay(50)
after each call toSwitchPanel::update()
seems to suppress any problems. I'm not sure whether to put the debounce delay inSwitchPanel
itself, or in the calling code.