|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: Gyro problem, please help!
Quote:
double lastAngle = 0; double newAngle =0; double realAngle = 0; gyro.reset(); while (isEnabled() && isOperatorControl()) { double move = y.getY(); motor.set(move/5); if (move > 0.01 || move < -0.01) { newAngle = gyro.getAngle(); lastAngle = realAngle; } else { realAngle = newAngle + lastAngle; gyro.reset(); } System.out.println(realAngle); System.out.println(move); Timer.delay(0.05); } } do you think this will work ? |
|
#2
|
||||
|
||||
|
Re: Gyro problem, please help!
Zach, 1 degree every 1-3 minutes is actually good performance from the KOP gyro. As far as I know, you're not going to be able to improve on it substantially.
Perhaps you can tell us the application. I can't think of many applications for a gyro that would be messed up by 1 degree over the course of the match. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|