|
Re: Equation for converting potentiometer voltage into angle?
Here is the equation we used last year:
positionDeg = (analogPot->GetAverageVoltage() - INHERENT_ZERO) * VOLTAGE_TO_DEGREES;
where INHERENT_ZERO was a value we measured and defined within our code for the position we chose to view as zero degrees;
and VOLTAGE_TO_DEGREES was a value calculated ahead of time to convert the voltage over a 90 deg travel into degrees. (This is simple to do because it is just a linear conversion. Take the difference of the pot voltage at 0 and at 90 and then divide by 90 to get this value.)
Hope that helps.
__________________
|