![]() |
Potentiometers in Java
Our team is trying to find a way to measure the position of our arm using a potentiometer. We're using Java this year and we can't find any classes that are for potentiometers.
Does anyone know the best way that we could program a potentiometer in Java to give us its position? |
Re: Potentiometers in Java
Quote:
|
Re: Potentiometers in Java
Quote:
Would we use getVoltage() or getValue()? It might be getVoltage() since (I think) potentiometers just limit the voltage when the knob is turned. I've never used potentiometers before, though. |
Re: Potentiometers in Java
It shouldn't matter, you will just obtain different values. getValue will be something more akin to a "percent" (but in a range of integral values), while getVoltage will be un-scaled to be a voltage.
IIRC, getValue will give you more resolution, but overall it won't matter. |
Re: Potentiometers in Java
OK, we'll just pick one and go with it in the code. Thanks for your help.
|
| All times are GMT -5. The time now is 10:39. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi