View Single Post
  #4   Spotlight this post!  
Unread 12-05-2014, 12:31
notmattlythgoe's Avatar
notmattlythgoe notmattlythgoe is offline
Flywheel Police
AKA: Matthew Lythgoe
FRC #2363 (Triple Helix)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Newport News, VA
Posts: 1,715
notmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond repute
Re: Turning Robot with PID Feedback from Gyro

Have you tried printing the angle from the returnPIDInput() method?

Could you be turning the opposite direction that you want to be? If you turn right and that causes the angle to count up you'll never get to -90. You'll probably also want to set your setpoint to something like

Code:
Robot.driveTrain.setSetpoint(-90.0 + Robot.driveTrain.getGyroAngle());
That way it'll always turn 90 degrees from your currently angle.
Reply With Quote