View Single Post
  #4   Spotlight this post!  
Unread 01-02-2017, 16:29
dvanvoorst dvanvoorst is offline
Registered User
FRC #2771 (Code Red)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Grand Rapids, MI
Posts: 73
dvanvoorst is an unknown quantity at this point
Re: PIDController Issues

It may be helpful to use the SmartDashboard to actually update your PID values on the fly so that you can easily see what they should be.
If you add a line to your OperatorControl main while loop that says something like shooterPID.setPID(SmartDashboard.getNumber("P: "), SmartDashboard.getNumber("I: "), SmartDashboard.getNumber("D: ")) (convert that from Java to C of course), then you can just type in new values to test with.
You can do the same thing with your SetPoint. Instead of hard coding it like you did, just pull the value from SmartDashboard. e.g. shooterPID.SetSetpoint(SmartDashboard.getNumber("S etpoint: ") (again, converting to C syntax)
Then you can try a larger P value easily to see if that's the issue. And try a zero D to start with.
__________________

Reply With Quote