View Single Post
  #3   Spotlight this post!  
Unread 19-01-2004, 20:01
Jay Lundy Jay Lundy is offline
Programmer/Driver 2001-2004
FRC #0254 (The Cheesy Poofs)
Team Role: Alumni
 
Join Date: Jun 2001
Rookie Year: 2001
Location: Berkeley, CA
Posts: 320
Jay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to all
Re: Failing analog inputs?

Make sure you do Get_Analog_Value(rc_ana_in01);

rc_ana_inxx are just the channels on the ADC, not the actual value. Get_Analog_Value() takes an ADC channel and returns the (10-bit) value on that channel.

We just modified the #defines for all the rc_ana_inxx to include the function call.

#define rc_ana_in01 Get_Analog_Value(ADC_CH0)