View Single Post
  #5   Spotlight this post!  
Unread 24-01-2007, 10:54
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 Kevin Watson View Post
If you're trying to use the sensor to measure tilt relative to the gravity vector, just use the ADC code to measure the outputs. Remember to take into account the ~2.5 volt bias. I have some code floating around here somewhere that shows how to derive tilt from the two outputs. I'll have a look and post what I've got.

-Kevin
Have a look at the attached code. You'll also need to get a copy of the ADC code from my website.

-Kevin
Attached Files
File Type: c accels.c (1.5 KB, 98 views)
File Type: h accels.h (1.8 KB, 86 views)
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org