![]() |
Gyro angle increasing while robot is static
We're trying to get the angle during Teleop mode. It worked in the past perfectly, and now every time we enable (and disable) the reading on the Driver Station LCD is rapidly decreasing 1/100th every second. But if the gyro feels like it, it will rapidly increase 1/100th every second.
This is how we're initiating it: Code:
#include "WPILib.h"Code:
void OperatorControl(void)Thank you in advance! |
Re: Gyro angle increasing while robot is static
In the past when I've used gyros, this happens when you set the sensitivity incorrectly.
|
Re: Gyro angle increasing while robot is static
Changing .01 degrees per second is a pretty good drift rate for the gyros that I've worked with. I'm used to more like 0.05 degrees per second.
|
Re: Gyro angle increasing while robot is static
Is the gyro calibrating with a still robot, e.g., hands-off, no compressor or other vibrating object running.
|
Re: Gyro angle increasing while robot is static
Quote:
I think your gyro is working just fine... probably better than ours! :D |
Re: Gyro angle increasing while robot is static
If the drift is bothersome during an extended practice or demo session, add a button to your code so the driver can re-zero the gyro whenever the robot is pointing in the zero direction. |
Re: Gyro angle increasing while robot is static
Quote:
|
Re: Gyro angle increasing while robot is static
Quote:
|
Re: Gyro angle increasing while robot is static
Thank you for all of your help everyone!
We figured it out: The problem was the wire that provides power for the gyro wasn't plugged in.. But the code above does work, excluding the sensitivity. So we changed that to 0.05 and the gyro works perfectly now. |
| All times are GMT -5. The time now is 14:12. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi