Thanks, Jon. Indeed, it was a great starting point. Btw: I like your versioning system. One remark: those rotary switches come in two variants: the solid versions intended for CNC machining and else actually show a quadrature signal. The cheap input switches often output a clock/direction signal. It can be decoded as a quadrature signal, but then four state changes stand for one increment.
The smart pins are just great. They do the dirty work in real time and you fetch a result whenever needed. It's like watching a tanker passing by and just take it, if you are in the mood.
Comments
I've attached my quadrature encode object that uses smart pins. Perhaps it will help you get started.
Thanks, Jon. Indeed, it was a great starting point. Btw: I like your versioning system. One remark: those rotary switches come in two variants: the solid versions intended for CNC machining and else actually show a quadrature signal. The cheap input switches often output a clock/direction signal. It can be decoded as a quadrature signal, but then four state changes stand for one increment.
The smart pins are just great. They do the dirty work in real time and you fetch a result whenever needed. It's like watching a tanker passing by and just take it, if you are in the mood.