View Single Post
  #3   Spotlight this post!  
Unread 25-01-2006, 01:15
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: Accelerometer code?!

Quote:
Originally Posted by David55
HI Kevin

I would like to know, what are the advantages of using the full-length accelarometer code found in your website? I was able to get the accelarometer working and printing values by simply doing

x=Get_Analog_Value(rc_ana_in01);
printf("%dn",(int)x);

and then got to an equasion and finished up the story.
If all you need to do is take a voltage measurement from a potentiometer or an accelerometer (to calculate an angle relative to the gravity vector), then my code is overkill. My code was originally designed to wring out the best possible performance out of a gyroscope and then later modified to sample additional ADC channels while also sampling a gyro. My code also uses oversampling and decimation to gain measurement resolution and lower the noise floor.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org