Convert Potentiometer value from 0-1000 to it's actual value
Posted: Wed Sep 19, 2018 11:47 am
Hello,
I'm using a Rotary Potentiometer - WDA-D35-D4C (ID: 3583_0) attached to a PhidgetInterfaceKit 8/8/8 (ID: 1018_2B) to track movement of a gun like object pointed at a screen. I'm using the C# library to access the Interface kit in code. In code, after connecting to the Interface kit I use this.interfaceKit.sensors[0].Value to get the value of the potentiometer. This returns a value from 0 to 1000. From the interface page (https://www.phidgets.com/?tier=3&catid= ... rodid=1021) under "User Guide", it states:
"If you have an analog sensor connected that you bought from us, you can select it from the Sensor Type drop-down menu. The example will then convert the voltage into a more meaningful value based on your sensor, with units included, and display it beside the Sensor Value label. Converting voltage to a Sensor Value is not specific to this example, it is handled by the Phidget libraries, with functions you have access to when you begin developing!"
However the 3583_0 does not show up in the Phidget Control Panel list and I can't find an equation that converts the 0-1000 to an actual value. I assume I could just divide by 360 since it seems like the 0-1000 is just one rotation of the device, but it'd be nice to know that is correct. Am I missing something or should I just assume the value needs divided by 360 to get the degree?
Thanks!
I'm using a Rotary Potentiometer - WDA-D35-D4C (ID: 3583_0) attached to a PhidgetInterfaceKit 8/8/8 (ID: 1018_2B) to track movement of a gun like object pointed at a screen. I'm using the C# library to access the Interface kit in code. In code, after connecting to the Interface kit I use this.interfaceKit.sensors[0].Value to get the value of the potentiometer. This returns a value from 0 to 1000. From the interface page (https://www.phidgets.com/?tier=3&catid= ... rodid=1021) under "User Guide", it states:
"If you have an analog sensor connected that you bought from us, you can select it from the Sensor Type drop-down menu. The example will then convert the voltage into a more meaningful value based on your sensor, with units included, and display it beside the Sensor Value label. Converting voltage to a Sensor Value is not specific to this example, it is handled by the Phidget libraries, with functions you have access to when you begin developing!"
However the 3583_0 does not show up in the Phidget Control Panel list and I can't find an equation that converts the 0-1000 to an actual value. I assume I could just divide by 360 since it seems like the 0-1000 is just one rotation of the device, but it'd be nice to know that is correct. Am I missing something or should I just assume the value needs divided by 360 to get the degree?
Thanks!