View Single Post
  #1   Spotlight this post!  
Unread 09-11-2013, 03:27
GuyM142's Avatar
GuyM142 GuyM142 is offline
Registered User
AKA: Guy
FRC #3339 (BumbleBee)
Team Role: Mentor
 
Join Date: Jul 2013
Rookie Year: 2012
Location: Israel
Posts: 158
GuyM142 is just really niceGuyM142 is just really niceGuyM142 is just really niceGuyM142 is just really niceGuyM142 is just really nice
Quote:
Originally Posted by billbo911 View Post
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
__________________
2016-2017 - Programming Mentor
Curie Sub-Division Champions with 694, 379 & 1511
2015 - Team Captain & Head of Programming Crew
Carson Sub-Division Champions with 1325, 20 & 1711
First ever Israeli team on Einstein
2014 - Team Captain & Head of Programming Crew
2013 - Head of Programming Crew
2012 - Member of Programming Crew
Reply With Quote