Quote:
Originally Posted by billbo911
I'm not sure which example you are using, but here is what I found.
If you open LV and click on "Support". Then select Find FRC Examples, you will find a Gyro example under the Analog folder.
The Get Angle vi returns two things: The current angle relative to where the robot started, and the current angular rate of rotation.
If you use the "Get Angle" output, I believe you will find what you are looking for.
See the attached image.
|
That's the vi I'm using, but it works differently in the simulator.
I think that the cRIO version of it would work the way I want to.
What I'm trying to accomplish is a vi which turns X degrees (rather than the shortest way to a certain angle), it doesn't even matter in which direction because I get stuck whenever the (current angle + degrees to rotate) is bigger than 180 or smaller than -180.
(The problem is the same for "rotate the shortest way to angle X, but leave it for now)
I hope I've explained it well
