|
I thought about using the trig functions, then I arrived at a better conclusion. If you have the time, it would be considerably easier to make a lookup lookdown command going off the servo value itself. If you are making a ball launcher, you don't need to know the exact distance away from the goal you are. You just need to know how fast to turn the motor. Instead of using two equations (one to find the distance and another to set the speed of the launcher), just use the lookup/down commands for getting the servo position then use the returned index value to set the speed of the motor.
__________________
Greg Szorc
gregszorc@cwru.edu
|