![]() |
Camera Troubles
I'd like to say there's a problem with the camera itself causing our problems. Unfortunately, the camera was working fine until I attempted to adapt the tracking and search code to manipulate the pwm output for our rotating turret instead of the pan servo. I tried my best to leave the tilt tracking code intact. When we tested, however, the panning code worked as anticipated, while the tilt code didn't work at all (well... it tried to work, but failed miserably resulting in a subtle twitching motion). It seems as though the camera is trying to change the tilt servo value and remain in home position simultaneously. I'd appreciate any ideas anyone might have to solve my problem. Thanks
|
Re: HELP!!! Camera with mental issues...
If you post the part of your code that isn't working, we'll be better able to help.
|
Re: HELP!!! Camera with mental issues...
Quote:
-Kevin |
Re: Camera Troubles
Here's my updated camera search code. So, if anyone has any insights I'd appreciate it.
Code:
//turn the turret to the right for a specified |
Re: Camera Troubles
Nothing in your code jumps out at me but I just don't like the fact that you type cast temp_tilt_servo as an int when you change the servo position then change it back to a unsigned char when finally setting the actual tilt variable. I would suggest however, that you use some sort of sensor to find the actual position of the pan device, at the very least you should use a limit switch or keep track of how many times you have turned left, or right, to be sure you do not break something.
|
Re: Camera Troubles
ok what tells the camera to go to home position or stay in home position. Is that on the camera itself and if so is there a portion of the code that overrides that? Basically, I'm wondering what could be causing the camera to try to stay in home position even when it's receiving new tilt servo values. I really don't know where to start.
|
Re: Camera Troubles
we had problems with the servo pwm cable being attached to the wrong input on the RC, if it is hooked up to the wrong PWM, it tries to stay on neutral, triple check to make sure PAN and TILT are hooked up to the pwm's stated in tracking.h
Quote:
|
Re: Camera Troubles
I've just discovered something. I was testing the tracking code again and found that when we ran it without the driving code, it worked fine, but when we ran it in the combined code we had problems with the tilt servo. :confused: So, my problem isn't in tracking.c; it must be somewhere else but I don't know where. Any idea what the problem could be?
|
Re: Camera Troubles
Do a search for all the pwm's, inputs and outputs the camera uses and see if any other code interferes.
|
Re: Camera Troubles
yup that was the problem. In the drive code, the drive motors are on pwms 1 and 2 and the camera also uses those outputs in the camera code. When I combined them I forgot to change the outputs for the drive motors. Man is my face red :o ... oh well at least it works now. Thank you everyone for your help.
|
| All times are GMT -5. The time now is 23:38. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi