Quote:
|
Originally Posted by Kevin Watson
Here's my first-cut at code that will give an angle relative to the gravity vector, which points down. I'm working on a calibration routine for the bias,
but for now, just assume it's at the 2.5v mid-point. This code will work with the ADC code on my website. I imagine this code would work great for knowing what angle your ball launcher was at.
-Kevin
|
If you guys decide to use the accelerometers to measure angles on your bot, keep in mind that the accelerometer will sense all accelerations in its axis. If you are moving or getting bumped or if your machine shakes violently, then you will pick up those accelerations as well as gravity, and the angle you compute will be less precise due to that noise. This will almost definitely keep you from shooting well on the run or under duress.
Good Luck!
-Joe