View Single Post
  #4   Spotlight this post!  
Unread 08-02-2015, 00:21
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Potentiometer values not changing

If I'm reading the C++ standard correctly, the variable pot will be initialized once when the loop begins. It doesn't get reinitialized every iteration of the loop. You can test this by disabling the robot and seeing if the value printed changes when you reenable the robot.

If that happens as I think it will, you should add a line pot = DartPot->Get(); to the loop somewhere before you use the value of pot.