View Single Post
  #3   Spotlight this post!  
Unread 25-04-2010, 04:35
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: please help in adxl345

We have written code to double integrate the ADXL345.
You can find the code here for the cRIO (http://proj.titanrobotics.net/hg/Frc...inc/TrcAccel.h)
But as Ryan said, it will cumulate error when you integrate it over time. Therefore, you must use caution when doing it. We reset the accumulator right before we start the PID control (which is what we use the accelerometer for). This will clear the cumulated error and start fresh. It works reasonably well for us. We also implemented Zero-G calibration to eliminate DC offset of the outputs.
__________________
Reply With Quote