Odd failure mode (async button input spamming) #15709
GM-Script-Writer-62850
started this conversation in
General
Replies: 2 comments 6 replies
-
sounds like you don't have suitable pull-up turned on, and the input is floating? |
Beta Was this translation helpful? Give feedback.
1 reply
-
have you tried measuring with a meter to see if it is really pulling hard to the rail? This sounds an awful lot like floating. Also, do you have the Schmitt trigger enabled? A slow transition across threshold could cause this. How long are the wires to the switch? RF pickup? You might need an external pull, maybe much lower resistance (few hundred ohms) if there is interference. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
EDIT: so i managed to make it happen again, i think this this was a just a ID10T error, do you see a
btn.double.clear()
in my code cause i don't...It was probably between 1 and 2 AM and i was about to go to bed so the time i could put into trouble shooting was very limited
i went into the garage to unplug a fan and close some doors, unplugged the fan, closed some doors, and held my button to turn the light off and it went crazy
So i have this code, i held my button while the light was on (
GPIO.light.garage.off()
should be run)instead it starts spamming double press, i have 4 momentary button in parallel (3 main wires, 1 is split at the end), i tried disconnecting the button I pressed, and it kept spamming away.
the light (120V AC LED light bulb; fused at 1A) is controlled via a solid state relay and a 2N2222A transistor
unplugged the pico and booting it back up and it was acting normal, any ideas as to what made it go crazy? never had it do this before, is has been in service for over a year
i can't think of a hardware level issue (condensation? emi pulse?) that would cause continuous spamming that would vanish with a power cycle
i also forgot i had a double press config till i was reading the code for this post...
Beta Was this translation helpful? Give feedback.
All reactions