View Full Version : OI and analog: Zero value
Astronouth7303
02-02-2004, 14:29
Get this: no joystick (infinate resistance, no voltage) has a value of 127.
Now take a potentiometer and wire it to a analog port. Turn it all the down.
It will read: 127, 0, ..., 127, ..., 255. A little heads up! Or is this unusual?
Dave Flowerday
02-02-2004, 16:00
Get this: no joystick (infinate resistance, no voltage) has a value of 127.
Now take a potentiometer and wire it to a analog port. Turn it all the down.
It will read: 127, 0, ..., 127, ..., 255. A little heads up! Or is this unusual?
It sounds like you connected ground to one side of your pot and +5 to the other. If so, you're supposed to leave the "ground" side unconnected. This is explained on page 5 of the FRC OI guide at IFI's site. From that document, "In the event that an analog input is less than 0.05V, a value of 127 will be generated." This is on purpose so that if nothing is connected to a joystick port, an internal pulldown resistor in the OI will pull the analog pins down to 0 volts and the OI software will translate that to 127. This way, if you accidentally unplug your drive joystick (for example), your robot won't start running full tilt backwards!
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.