Quote:
Originally Posted by Brad Voracek
My question, what is the best way to change those PWM outputs to a tangible angle for the tangent function to use?
|
I believe the best way is not to use the tangent function on an angle in the code. It's both easier and quicker to use a small lookup table that turns the camera tilt PWM value into a distance.
You can use a tangent function when you
create the lookup table, of course. Or you can fill in the table empirically by repeatedly placing the robot a known distance from the target and observing the tilt angle.