View Single Post
  #3   Spotlight this post!  
Unread 19-01-2008, 10:04
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 590
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: Integration of Gyro with Easy-C Pro

Quote:
Originally Posted by marccenter View Post
How does this correlate to Easy-C implementation? If I place the function in a while loop, won't the function integrate multiple times and get different results.
What Easy-C implementation should I use with the gyro to make sure it only get's implemented once during the 18 msec(?) loop?
The runtime code in easyC does the integration for the gyro in the background on a timer interrupt. So it is independent of the user/master processor data exchanges or loops in your program. When you read the gyro angle using the easyC or WPILib function, it just gives you the most recent value for the heading that was computed in the background.

Does this answer your question?
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute