|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: Moving bot once targeted on the light
make sure that there is no other drive code in that is setting your motors to joystick inputs later on in the code. you would have to comment those out.
just to make sure you realize this code will drive forward until the camera loses sight of the target. just don't want you to smash into anyone. :-D |
|
#2
|
|||
|
|||
|
Re: Moving bot once targeted on the light
Question.
This code goes into the user_routines.c file of the workspace. Does this go into the same section where the mapping of the pwm's to the joysticks go? And if so, dont you just fix the problem by setting the pwms from the camera imput, AFTER the pwm mapping of the joysticks? Or is it more complicated than this? We are stuck on this same issue. |
|
#3
|
||||
|
||||
|
Re: Moving bot once targeted on the light
Try something other than 255... I believe 255 is a special value.
Try like 180, which is in the middle, way out of the deadband and not the maximum Or, you could try 250, and see if the Victor light becomes red (FYI: The Victor light is the most accurate source if you are stuck with a PWM value problem... that one light tells you a lot of info. If it is flashing orange, it's a 3-pin PWM cable problem, or it's set to a special value that disables it (like if your robot is detached). If it's completely off once you run the code, the motors are running slowly or half-speed. If it's solid orange, they are inside the deadband or completely stopped. If it's bright red or green, it's running full power in forward or reverse.) |
|
#4
|
|||
|
|||
|
Re: Moving bot once targeted on the light
I found that CAMERA_ON_TARGET state goes on and off too much to do any good. I've tried this state and it works realiby:
Code:
if( Get_Tracking_State() == SEARCHING)
{
pwm10 = pwm08 = 127;
}
else
{
pwm10 = pwm08 = 135; // 135 is nothing unless its a really geared down motor :)
}
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Keepers in Teleoperated mode | burkey_turkey | Rules/Strategy | 47 | 05-03-2007 12:56 |
| camera trouble,cant tell the green-light from regular white light | Nimmy | Programming | 26 | 14-01-2007 14:53 |
| How will the Balls Change once FIRST Paints them | Mr.G | General Forum | 28 | 24-01-2006 23:07 |
| Moving the Nats. Date? | roboTICKS-236 | General Forum | 4 | 19-03-2003 22:49 |
| ONCE AGAIN, EVERYONE TELL ME THE ANSWER! =) | archiver | 2001 | 2 | 24-06-2002 02:42 |