View Single Post
  #6   Spotlight this post!  
Unread 15-02-2005, 11:22
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: Using gyro.c with other analog sensors no go

Quote:
Originally Posted by Jeff G
Can we not simply use a standard analog input for the gyro?
Sure, if you only need angular rate of change.


Quote:
Originally Posted by Jeff G
Why is it necessary to use the ADC as set up in the example code?
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
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org