View Single Post
  #2   Spotlight this post!  
Unread 07-02-2006, 17:00
kaszeta's Avatar
kaszeta kaszeta is offline
Registered User
FRC #0095 (Grasshoppers)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Lebanon, NH
Posts: 334
kaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of light
Re: Potentiometer help

Quote:
Originally Posted by Unholy
Greetings everybody,
I'm Dan from 1402, and I have sort of an issue in my hands among with my programming group. To begin with, we're not very C-savvy, so just bear with us. We want to include a potentiometer in our program, but we're not exactly sure how to go about it. Last year, I was thrown into programming during the season, so I never really quite got the potentiometer part. We are not exactly sure where to add the basic potentiometer data (definition, etc). Also, we plan to have set values, so we are wondering where could we define such values. We appreciate any help we can get.
Thanks in advance,
-Dan, Yuriy, and Chris
Pots are easy. Check out the FIRST Guidelines, Tips, and Good Practices document. But basically, the pot gives a 0-5 V signal, which is read by the RC using Get_Analog_Value() (unless you're using Kevin Watson's ADC.c/h), yielding a 10 bit value (0-1023).