Hello everyone. I usually don't like to ask for help, but I'm at a total loss.
Basically I'm trying to figure out a way to detect a change on a 8-position rotary switch. Here is the setup: A rotary switch, with one common connected to ground. And all 8 pins connected to a mega board. I need some relatively simple way to detect when one of those 8 pins changes it's state, After the State change has been detected, The code should check what position the rotary is at.The rotary switch is a non shorting. so there is a small period where all pins will be floating I've tried to implement the included example program with no success. The pins I use for the Positions are 28, 30, 32, 34, 36, 38, 40, 42. All of the mega boards Interrupt pins are reserved. My programming experience is Intermediate.
inrg:
I've tried to implement the included example program with no success.
Post the code you're tried so far. Use Code Tags.
The rotary switch is a non shorting. so there is a small period where all pins will be floating
If the input pins are set for INPUT_PULLUP that should not matter. Pins will always read HIGH unless the rotary switch has switched them to ground, then they will read LOW.
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.