Thread: Gyro Help
View Single Post
  #2   Spotlight this post!  
Unread 04-02-2015, 19:22
Ben Wolsieffer Ben Wolsieffer is offline
Dartmouth 2020
AKA: lopsided98
FRC #2084 (Robots by the C)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Manchester, MA (Hanover, NH)
Posts: 520
Ben Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud of
Re: Gyro Help

I am assuming your code turns until it reaches the target angle and then shuts the motors off. You are overshooting because the robot has momentum and continues to spin after the motors stop receiving power. To make it turn to an exact angle, you need a PID controller, which slow the robot down as it reaches its target angle. They can get fairly complex to tune optimally, but the concept isn't that hard to understand. Here are a few resources to get you started:

http://m.eet.com/media/1112634/f-wescot.pdf
http://wpilib.screenstepslive.com/s/...rs-pid-control
__________________



2016 North Shore District - Semifinalists and Excellence in Engineering Award
2015 Northeastern University District - Semifinalists and Creativity Award
2014 Granite State District - Semifinalists and Innovation in Control Award
2012 Boston Regional - Finalists
Reply With Quote