Help reliably reading switch on long wire

I'll throw in my 21 cent here... I think you either need to add proper filtering or switch to polling to ensure proper software debouncing is in place. If you have the possibility, put an oscilloscope in there to see what you are battling against. :slight_smile: