I've got a small Sharp mechanical rotary encoder with 24 detent positions (11) and I want to know how I can make it waterproof.
CW = 11 10 00 01 11
CCW = 11 01 00 10 11
What I do now is this.
rotEnc:
debounce to steady values
If 11 clear flag
If 00 set flag else clear flag
If 01 && flag set -> INC
If 10 && flag set -> DEC
ret
But when a user should turn exidently 11 10 00 10 11, so when the encoder drops halfway back into the detent position were it came from it must not INC or DEC, now it does now and then.
I've another type encoder which does not have three switch positions, this one has so I think it can be made waterproof.
:roll: