by linuxlizard · 12y ago · 0 comments
Don't forget debounce. Debouncing can be tough. http://www.ganssle.com/debouncing.htm
http://arduino.cc/en/Tutorial/Debounce or http://playground.arduino.cc/code/bounce
https://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/robo...
You can also debounce on hardware with a capacitor. Really simple too and does not waste CPU cycles.