|
Re: Has anyone gotten useful data from the accelerometer?
Quote:
|
Originally Posted by Chriszuma
I just took in the data from it and summed it into a static variable. I tried bitshifting it, putting on a deadband, everything i could think of, but it looks like the data is just not accurate enough, or maybe it can't read from it quickly enough. I'll post the code later tonight, since it's currently saved on a computer half an hour from here.
|
Are you accounting for ALL acceleration? Fun fact: That chip will provide you with a deluge of information all lumped in to one signal. You need to filter out gravity, acceleration from getting hit, deceleration and probably more I'm not thinking of.
Also, it measure acceleration, not velocity, so if you're cruising at a constant speed, it'll read back 0 acceleration...plus the above mentioned factors. Gravity is tough, it varies based on orientation, on the upside that makes it great for sensing absolute angle when you're not moving, maybe use it for that and use encoders for velocity?
Hope that helped..
__________________
Matt Krass
If I suggest something to try and fix a problem, and you don't understand what I mean, please PM me!
I'm a FIRST relic of sorts, I remember when we used PBASIC and we got CH Flightsticks in the KoP. In my day we didn't have motorized carts, we pushed our robots uphill, both ways! (Houston 2003!)
Last edited by Matt Krass : 19-01-2006 at 16:55.
Reason: Punctuation
|