Using Cortex, RobotC. Trying to make a “poor mans” encoder using digital sensors and wanted to take advantage of what I believe is interupt driven counters on the Encoder sensor setup. I wired a switch to the digital input and configured it as a single wire encoder. Enabled sensor debugging. On the first signal edge (press switch) I get a large jump in the value 10-15 range, and on the next edge (release switch), I get a smaller change, like 1-3. If it were consistent I could probably work with it but it’s not. Don’t know the cause of the inconsistency, maybe switch bouncing?
What IS the expected input from a single wire encoder? I don’t have one nor a scope to test it.
If I can’t use the encoder built in counter, that leaves me back to trying to poll the digital input value of 0 and 1, but I’m afraid I’m going to miss counts with that.
What’s the best way to count digital switch inputs and not lose a count? Put in a separate task I thought might help. Wish I knew what the max input frequency of that monitoring would be.