Our students are currently trying to reprogram last years robot with Command based programming. Last year we used a homemade PID function to controller our arm instead of wpi's PIDController.
We are now trying to use PIDController with the arm; one potentiometer is the input. When we set the set point to a known location and enable the PID, the pid outputs -1 100% of the time, when we move the arm across the known point the pid output never changes. Below is how we have the ReturnPIDInput defined.
We have had success with controlling the Shooter with a PID but we cannot get the arm to work.
Is it possible the PIDController is trying to read a voltage too quickly from the pot and we are recieving a NULL value back?
Anyone run into issues with this?
Code:
double Arm::ReturnPIDInput () {
return armPot->GetAverageVoltage();
}