View Full Version : Autonomous Camera Stupidity
TuaMater
15-02-2006, 20:29
I have a feeling that this is a really really bad question, but I've checked all the FAQs twice and I haven't been able to fix it yet. I blame being a rookie.
How do we get the camera to start tracking in autonomous mode? When we get our controller to go to autonomous mode, our camera sits there doing nothing, but when we switch over to the main mode, we start searching fine. Is there some sort of initialization in user_routines_fast that needs to be added or are we missing something bigger here?
Jared Russell
15-02-2006, 20:39
Be sure to call Camera_Handler() and Servo_Track() in the User_Autonomous_Code() function in user_routines_fast.c
TuaMater
15-02-2006, 22:24
Yeah that's probably our problem, I'll check that out in tomorrow's meeting. Thanks for the response.
TuaMater
17-02-2006, 15:29
Okay I tried that and it didn't change anything. Essentially what happens is that when we stick it into autonomous mode, the camera doesn't seem to be getting any input from the PWMs, since I am able to move it manually, unlike normally when the code is running the servos will provide a good deal of resistance against realigning it with my hand. So I'm guessing there's some problem with it outputting to the PWMs 1 and 2.
Also, since our dongle isn't finished, we're sticking it into autonomous using team #0 and removing the tether. When we put the tether back in and reset, everything works fine. I don't know if the way we're sticking it into autonomous has anything to do with our problem, but I doubt it.
Anyone have any ideas? I'm gonna be here all night playing to see if the PWM outputs or lack thereof is the issue like I think it is.
EDIT: Tested this out. It seems for some reason that the PWM outputs are not going to the camera. I did a printf on the values going out of 1 and 2 and they coincide with the correct values for searching. So for some reason, when we start autonomous mode, the controller is not correctly sending out the PWMs to the camera.
EDIT #2: Problem fixed. It was a problem with removing the tether and putting it into autonomous that way. Once I set it to trigger autonomous through the joystick it worked just fine. Thanks again for the help.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.