Go to Post Your team has a cave?!?!? OMG, how did you guys get that?!?! Do you have a cave sponsor? We tried talking to cave sponsors but none of them responded. You guys must be an elite team to have a cave. - marshall [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 25-01-2006, 00:51
David55 David55 is offline
Registered User
AKA: David Hillman
FRC #1577 (Steampunk) & FRC #125 (NUTRONS)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Raanana, Israel / Boston, MA
Posts: 279
David55 is a splendid one to beholdDavid55 is a splendid one to beholdDavid55 is a splendid one to beholdDavid55 is a splendid one to beholdDavid55 is a splendid one to beholdDavid55 is a splendid one to behold
Accelerometer code?!

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("%d\n",(int)x);

and then got to an equasion and finished up the story.
  #2   Spotlight this post!  
Unread 25-01-2006, 00:53
Joel J's Avatar
Joel J Joel J is offline
do you..
no team
 
Join Date: May 2001
Rookie Year: 2000
Location: San Jose, CA
Posts: 1,445
Joel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond repute
Re: Accelerometer code?!

Kevin's code is pretty much the same as what you are doing if you set it to average only a couple samples. If you bump that number up to, say, 16, then you have a much improved acceleration/angular_velocity value.

There's also a very good bias detection algorithm (its simple too!).
__________________
Joel Johnson

Division By Zero (229) Alumni, 2003-2007
RAGE (173) Alumni, 1999-2003

Last edited by Joel J : 25-01-2006 at 00:56.
  #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
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Out of the Box Camera Code russell Programming 9 21-10-2009 05:28
Some things i'm trying to understand on Kevin's Accelerometer Code Squall Programming 2 03-02-2005 12:01
Team THRUST - Kevin's Code and Camera Code Combine Chris_Elston Programming 3 31-01-2005 22:28
Example accelerometer code released. Kevin Watson Programming 0 20-01-2005 03:45
heres the code. y this not working omega Programming 16 31-03-2004 15:18


All times are GMT -5. The time now is 17:54.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi