I really thought i had cracked this until i got the phidgets 8/8/8 interface and sliders. I am trying to use a IR motion sensor to detect a distance and hold a slider at that distance. Problem is as soon as the item is moved away from the sensor the value jumps back to zero (or there abouts). I need the sensor to only change when it detects a change within its sensing distance and not when there is nothing in its distance (hence the item removed from its measuring distance). A problem i think which i wasn't expecting was that the sensor returns values continuously - not in time but in value step. so if the sensor reads a value of nothing from a value of 500 then it steps through all of the values in between until it gets to zero - this stops me capping the sensor by saying if the sensor value is less than 20 then do nothing.
Does anyone have any clue as to how i can accomplish this?