View Single Post
  #3   Spotlight this post!  
Unread 12-03-2004, 10:38
Salik Syed Salik Syed is offline
Registered User
FRC #0701 (RoboVikes)
Team Role: Alumni
 
Join Date: Jan 2003
Rookie Year: 2001
Location: Stanford CA.
Posts: 514
Salik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud of
Send a message via AIM to Salik Syed
Re: Differences programming ADXRS150EBs to BEI Gyrochips?

Quote:
Originally Posted by Mark McLeod
I believe Ken is competing in Pittsburgh this weekend, so you may not hear from him as often as usual (but I bet he'll find time to get on-line).

You will need to take the ADXRS150 40 Hz sample rate into account when calculating your heading. Depending on how you've setup your gyro sampling for the old gyro, you'll need to scale each gyro sample to average the over-sampling.
If you are using a timer to specify the gyro sample rate in the fast loop, for instance, and you are taking 100 samples per second then you might have the line:
Code:
gyro_sum += gyro_sample * 40 / 100;
Are you are flat-out sampling the gyro every time through the fast loop?
yes I am sampling the gyro every CPU cycle, do you know what the sample rate of the BEI Gyrochip is ? I assume it is 100hz .... from the code u gave me? so i guess i could just divide by a larger constant.... but given the simplicity of the code we are using i think it may work even with the lower sample rate..

its kinda like this
heading=heading + (127-gyrovalue)
then we divide heading by 439 to get a degree measure....
we are not doing any integrations
__________________
Team 701