Accelerometer controlling 2 servos
March 26, 2010
Good Evening Everyone,
What I am trying to do is use an accelerometer (http://www.sparkfun.com/commerce/product_info.php?products_id=847) to control two seperate servos (http://www.servocity.com/html/s3003_servo_standard.html), I was thinking I would use this microcontroller (http://www.sparkfun.com/commerce/product_info.php?products_id=666). (Are these all compatible?)
The idea is balance a platform in a dynamic equilibrium with the two servos, as on if it rotates clockwise (0 to 90 degrees) in the x axis, it would move servo a in the positive direction, and servo b in the negative direction.
likewise on the same x axis if the platform rotated counterclockwise, servo a would move in the negative direction, and servo b would move in the positive direction.
Also there will be movement in the y axis(0 to 90 degrees). In a manner such that if the board starts to rotate forward servos a AND b will both move in the positive direction, and if it starts to rotate backward, servos a AND b will both move in the negative direction.
Will the microcontrolled be able to accept those signals and send out the proper balance to each servo? (As in there will movement in x and y axis at the same time, which will mean each servo has two inputs)
For example if movement in the x axis tells servo a to rotate 30degrees clockwise, but movement in the y axis tells it to move 15 degrees counterclockwise, will the end result be a rotation of 15 degrees clockwise like I need it to be?
Hope this can be understood.