|
Re: Controlling motors using vision processing help
The output of the rectangular target processing is between -1 and 1. You should be able to scale this a bit and build a proportional controller pretty easy. If you do nothing else, you can send the value to the motor, or perhaps the negative of the value.
Another important element is to select which target you are aiming at and keep it consistent.
Finally, you may find that the camera is not a very quick sensor. It is great for deciding how much to rotate, not so great to close a control loop with. You may find that using a pot or encoder may be even better way to go once you know how much to rotate.
Greg McKaskle
|