|
Re: Toltechs success with camera
Ianuser:
why do you divide 50 by 90?
Degrees/per step = The amount of tilt angle in the camera/ number of PWM steps
The number of steps you have is 51 (194-144) inclusive...
okay never mind, 1.765 is the right number... you just wrote it wrong in the post.
Now are you sure that the camera has a 90 degree range when varying from level (pwm = 144) to fully raised( 194) ? I don't think that is right, but i'm an alumnus, and haven't played with the camera much.
You turn off I_want_to_search when range is <= 50, i'm assuming that sets the PWM values to neutral, that is why the camera looks away.
How to move? The fastest/simplest way is to scale your motor speed to your tilt angle (and thus your distance),
so do something like this:
PWMsout = (194-cameraTiltValue)*Scalar;
__________________
Team 701
|