Quote:
Originally Posted by Hazmatt
Hello all. How can I use accelerometers to keep a robot's arm parallel to the ground? My initial thought process was to use the accelerometers to measure acceleration due to gravity, and if it felt any, then make the motors move the arm the opposite way. Does this seem about right? And can this be done with one accelerometer? Thanks in advance!
|
Yes, this can be done, but you need to use a dual-axis accelerometer. The best mounting orientation is with the x and y axis at a fourty-five degree angle relative to the gravity vector (this is because the maximum rate of change of the accelerometer outputs is at this angle). Also, have a look at the
atan2() function.
-Kevin