View Single Post
  #4   Spotlight this post!  
Unread 06-02-2008, 18:14
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: We need help with the analog inputs

Quote:
Originally Posted by M_dalgashon View Post
Hello, I'm from team 2230, and we use potentiometers to check axis. Last year we used one potentiometer, this year we use two of them... But when we connect them both to analog inputs 1 and 2, for example, the rc only reads one of them, the one on analog input 1. We tried switching them, moving them to other pins, no use.
We have another problem, which may be connected... When we write the following piece of code:
temp = Get_Analog_Value(rc_ana_in01);
We get the following error:
M:\FRC2008\Programming\potentiometer\teleop.c:185: Error [1105] symbol 'ADC_CH0' has not been defined
To the best of my knowledge, ADC_CH0 is defined... Can someone help?

Thank you very much
Team 2230
Sorry about the confusion I've created. The Get_Analog_Value() function has been replaced with a version that has the same functionality, but doesn't have any dependancies on external libraries or header files (other than ifi_frc.h). You can get the code here: http://kevin.org/frc/quick_adc.zip.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org