|Page 1 of 1|
|Author:||zdoll11 [ Thu Jul 08, 2010 3:55 pm ]|
It seems there is little info in the sample programs as to how to retrieve data from a potentiometer, please help with any available info. Thanks.
|Author:||bfeher [ Wed Jul 14, 2010 9:40 am ]|
|Post subject:||Re: Potentiometers|
You can read the values of the Potentiometer Sensor just like any other sensor, by using the
For the VEX2.0 Cortex, the Potentiometer returns values from 0 to 4095, however due to the mechanical design there may be physical stops, limiting the actual reading from 5 to 4090 or so. This seems to range from sensor to sensor so just plug yours in and see what you get.
Below is a program that reads the values of a Potentiometer Sensor attached to Analog Sensor Port 6, and displays the values to the VEX LCD. If you don't have an LCD, you can just as easily (and more accurately) see the values in the ROBOTC Debugger under the "Sensors" tab (Robot > Debug Windows > Sensors)
|Page 1 of 1||All times are UTC - 5 hours [ DST ]|
|Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group