The way the PID controller in WPI lib works is that you inherit the PIDOutput class and provide a PIDWrite callback function. The PID controller will call the PIDOutput:: PIDWrite function to run your motors. In essence, do something similar to this:
Code:
class MyRobot: public SimpleRobot, public PIDOutput
{
public:
void PIDWrite(float output)
{
//program your motors accordingly with the output value.
}
MyRobot()
{
//Create the PID controller object.
}
}