View Single Post
  #2   Spotlight this post!  
Unread 28-02-2012, 19:13
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Use Gyro to turn 90 Degrees

There are many ways to do that.
  • You could just reset the gyro angle then command the robot to start to turn while monitoring the gyro angle until it reaches or passes beyond your target angle (e.g. 90). This is the simplest but you probably will overshoot (e.g. turn 95 degrees instead of 90).
  • You could use a PID controller to control the speed of turning so that when it is approaching your target angle, it slows down and hopefully stops at your target angle within the allowed steady state error. This requires you to use the PID controller and also tune the PID constants.
__________________
Reply With Quote