View Single Post
  #4   Spotlight this post!  
Unread 10-02-2007, 10:56
Shinigami2057 Shinigami2057 is offline
Slackware Is Your New God (Mentor)
AKA: Harry Bock
FRC #1350 (Rambots)
Team Role: Programmer
 
Join Date: Oct 2006
Rookie Year: 2006
Location: Johnston, RI
Posts: 106
Shinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really nice
Re: Help! Analog Inputs!!

It doesn't really matter in this case, but when using an unsigned value, like analog inputs, you should use %u and not %d (the ADC conversion gives you a 10-bit value, 0-1023, so it should never come up as negative, but it's good to know in case you need a full 16-bit unsigned int).

Just make sure that the pot is properly connected (red + black leads to the outer leads on the pot, white to the wiper/middle lead) and you should have no problems. Our arm potentiometer got disconnected during testing and its value started creeping by 1 every few seconds, it was really weird. O_o
__________________
One of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs.