tikismoke / domogik-plugin-rpigpio

GNU General Public License v3.0
0 stars 0 forks source link

Add debounce option #3

Open tikismoke opened 8 years ago

tikismoke commented 8 years ago

Avoid user to add a 0.1uF on switch:

To debounce using software, add the bouncetime= parameter to a function where you specify a callback function. Bouncetime should be specified in milliseconds. For example:

add rising edge detection on a channel, ignoring further edges for 200ms for switch bounce handling GPIO.add_event_detect(channel, GPIO.RISING, callback=my_callback, bouncetime=200)

tikismoke commented 8 years ago

After using the callback from #1