View Single Post
  #7   Spotlight this post!  
Unread 15-02-2005, 12:02
Jeff G Jeff G is offline
Registered User
#0648
 
Join Date: Nov 2004
Location: Quad Cities, IL & IA
Posts: 5
Jeff G is an unknown quantity at this point
Re: Using gyro.c with other analog sensors no go

Quote:
Originally Posted by Kevin Watson
Sure, if you only need angular rate of change.


For those that need heading too, you need to integrate the gyro's output, which means that you must also know the amount of time between ADC samples. The way I look at it, reading and restarting the ADC during a timer interrupt service routine is the simplest and most elegant way to solve the problem short of using external hardware.

-Kevin
Doesn't get_analog() obtain a reading when requested since it is off the FRC, or is it only updated once per master loop?

In which case how about I use the timer only to gain an accurate measure of the master loop interval?

I want to run several other analog inputs along with the Gyro, and heading is important as I am using your robot code. Slightly modified to handle a steered front wheel and counting every trigger from the encoders, since they are only 16 pulse.

I really appreciate the ability to start with your code and tweak from there!!

Thanks - Jeff