Page 1 of 1

Rotary Encoder Knob

PostPosted: Sat Nov 26, 2016 7:04 pm
by DaveyBoy
Hi Guys
First post here. Been getting to grips with Flowstone for a few months now... loving it :D

Thanks to Tulamide's excellent and very informative post about circular mouse checks here:
http://www.dsprobotics.com/support/viewtopic.php?f=3&t=3837&hilit=circular+mouse,
I've managed to make this rotary encoder knob in Ruby, It sort of works, does what I want it to do, but has a little anomaly.

Image

https://drive.google.com/open?id=0B0wtLOlFOjqbb3Y5ZmEySERibXM

The knob is rotated by winding it round and round and I'm using the angular position of the knob to calculate the direction it is moving and then calculate an output value.
However when the knob passes through zero degrees the direction becomes momentarily falsely reported.

is there a way to count up past 359 degrees (360..361.. etc)? and vice versa (360..259..etc)

Any help, suggestions or advice would be greatly appreciated

Thanks in advance
Dave