|
Re: Please help. I've had it with this camera
It's probably the easiest to drive with the centroid value. So, in easyC you can use the two/four wheel wheel drive function and in MPLAB you can using the mixing value.
If you do:
Set you gain low and work your way up. Your robot should drive to
the target with this. Your best is to only have it track only one thing at a time. Center - Drive - Center - Drive....
Error_Y = (Centriod_Y_Target - Centriod_Y_Current);
Rotation = (Error_Y * Gain_Y);
Error_X = (Centriod_X_Target - Centriod_X_Current);
Speed = (Error_X * Gain_X);
QUOTE=AdmiralAllen;555954]I'm having a very similar problem....
the camera follows the light.... but how do i get the whole robot to go twoards the light, and still be able to change direction or stop when it gets close?[/quote]
__________________
FIRST Team 501 PowerKnights - Mentor
FIRST Team 40 Checkmate - Mentor Alum
FIRST Team 146 Blue Lightning - Alumni
|