View Single Post
  #7   Spotlight this post!  
Unread 14-02-2007, 16:52
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: HELP: analog input

Quote:
Originally Posted by Bharat Nain View Post
Without using Kevin's code:

Potentiometervalue = Get_Analog_Value(rc_ana_in01);
I think Bharat is trying to tell you (and he's right) that it's overkill to use my code to read a potentiometer. Just use his example and it should work. If you really want to use my code, if I remember correctly, Get_ADC_Result() returns an unsigned int, which means you should use %u in your printf() format string, not %d.

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