PID Sample temp

Is there a way to implement pid to the sample robot template. I’ve tried and it seem to keep looping rather than being ran in autonomous. I know that it’s easier to use command base for pid but transcribing the whole program for the loop is painful.

Thanks in advance!

If I understand you correctly, the PID code is looping itself, thus not allowing autonomous() to continue to run? If that’s the case, you could consider either writing your own PID or possibly run the PID method in a different thread.