Aussie Susan
Advanced Member level 5
It is unlikely that the switch is the problem (and easy to check, preferably with a DSO but also a DMM).
However changing things on a whim is NOT a good idea. If you *know* that the switch is faulty then replace the switch with a known good switch; don't introduce another complication such as an encoder.
Can you flash the LED as I suggested?
If you have then move to turning it on when the button is down and off when the button is up?
Have you added the delay after you turn off the LED as suggested by Betwixt in Post #37?
All of these are MUCH simpler to test than making random changes and MUCH more likely to lead to success.
Susan
However changing things on a whim is NOT a good idea. If you *know* that the switch is faulty then replace the switch with a known good switch; don't introduce another complication such as an encoder.
Can you flash the LED as I suggested?
If you have then move to turning it on when the button is down and off when the button is up?
Have you added the delay after you turn off the LED as suggested by Betwixt in Post #37?
All of these are MUCH simpler to test than making random changes and MUCH more likely to lead to success.
Susan