View Single Post
  #25   Spotlight this post!  
Unread 19-09-2005, 01:07
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Testing and Cause of Failure for Encoders and Hall Effect sensors

Quote:
Originally Posted by ChrisH
Do I just have to change the variable definition to increase the bit size?
The Get_Analog_Value() function returns the full 10-bit result from the analog-to-digital converter. For example,
Code:
 Get_Analog_Value(rc_ana_in01)
will give you a number from 0-1023 representing the voltage (from 0 to 5 volts) on the first RC analog input.

Typically, one will #define a more friendly name for the signal:
Code:
#define angleFeedbackPot = Get_Analog_Value(rc_ana_in02)
And that's all it takes.