@djazzz said in GPIO software debounce:
perhaps if the debounce-function isn`t working correctly i have to work with gpio directly…
Maybe the following thread is helpful as it also bases on using ofoff (without debounceTimeout, btw.) and has a cable length of roughly 10-15m. The thread also includes a schematic which you may want to try:
------------------------------+3.3 volts pin on Pi
|
|
10 K pull-up resistor (or internal)
|
-----330 ohm resistor-----+------------------------------ GPIO Pin on Pi
| |
switch |
| 10 nF capacitor
| |
+---------------------------+-------------------------------- 0 volts = GND = Ground, pin on Pi
https://www.raspberrypi.org/forums/viewtopic.php?f=44&t=49722
EDIT: You should also consider taking further measures against interference, e.g. use twisted pair or shielded cable.
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law