View Single Post
  #4   Spotlight this post!  
Unread 04-02-2013, 18:35
Skyehawk's Avatar
Skyehawk Skyehawk is offline
Nuts N' Bolts
AKA: Skye Leake
FRC #0876 (Thunder Robotics)
Team Role: Mentor
 
Join Date: Nov 2012
Rookie Year: 2011
Location: Northwood, ND
Posts: 221
Skyehawk is a name known to allSkyehawk is a name known to allSkyehawk is a name known to allSkyehawk is a name known to allSkyehawk is a name known to allSkyehawk is a name known to all
Re: Need help programming a potentiometer

Simply declare a new analog channel (Begin.VI); in periodic tasks, get your refurm name (outside the loops) then put a get voltage on the inside of a loop running at about 100 times a second. You will need to multiply the voltage from the get voltage block (located in analog) in order to get an accurate reading. then use this number however you wish, maybe send it to a global variable. You could also run the refurm name and the get voltage in the teleop (although periodic tasks is much more efficient for this sort of thing).
Reply With Quote