|
Re: Flaky Potentiometers
Hmm.... I will use what I know on this...
What type of variable are you using in the c program to keep track of the potentiometers?
32768 is the positive limit for a signed integer variable in the C program...
There is signed integers which can go from -32768 to positive 32768, and unsigned goes from 0 to 65535.
It is possible that the Potentiometer is put on the robot very loosely, and continues turning in one direction when your arm moves, and etc.
In our program, in order to make it easier for us to read a potentiometer, we use unsigned char (characters), which have a range from 0 to 255, making it easier to keep track of the pot's location.
I hope this helps....
__________________
Sparkie: The little bot(s) that could.
Last edited by The Cyborg : 21-02-2005 at 19:42.
|