I just finally updated my code in order to use the camera (procrastination is bad). After reading through the code, it shows that Default_Routine(); is commented out.
Above it shows that the PWM1,2 are used for the camera PAN/TILT. I don’t remember if the camera has the servos plugged into that board, or if it were plugged into the robot controller.
If it was plugged into the camera board, how would I make the camera work if I changed (tracking.h’s)
// By default, PWM output one is used for the pan servo.
// Change it to another value if you’d like to use PWM
// output one for another purpose. #define PAN_SERVO pwm01
// By default, PWM output two is used for the tilt servo.
// Change it to another value if you’d like to use PWM
// output two for another purpose. #define TILT_SERVO pwm02
to become
**
// By default, PWM output one is used for the pan servo.
// Change it to another value if you’d like to use PWM
// output one for another purpose. #define PAN_SERVO pwm09
// By default, PWM output two is used for the tilt servo.
// Change it to another value if you’d like to use PWM
// output two for another purpose. #define TILT_SERVO pwm10
**
Isn’t the Camera board controlling the servos? If the PWM09 and 10 are used, doesn’t the cam board only use 1 and 2?
Kind of seems weird to me… I haven’t got my hands on the cam yet…
And one more little question, to power the cam, (I don’t have any of the papers regarding the pinouts etc), I could hook this into an analog port to power the system correct?
Not quite. The CMUCam2 requires between 6 and 15 volts to run. While the 5V from the I/O pins won’t be sufficient, the 7.2V from the PWM output pins will be perfect. So, plug the power cable into an unused PWM header, and you’ll be good to go.
Just found out that our team doesnt want to use the servos… they want to mount the cam directly onto the bot… read my other post that just went up a few secs ago HELPPP!!!
Actually it should work off the analogs, I tried it once and I think it worked, it’s been so long, but it takes mere seconds to try. It won’t be sufficient if the servos are connected to the camera board, but otherwise I think it will work. But again, I haven’t tried this since week 4 of build, and I think it works. I’d be interested in the results of a test. Of course even if it powers on the lower power levels could screw with it, so give it a thorough test, and at any doubt, switch over the PWMs to boost the power level. The “problem” is the 7.2v on the PWMs are taken, interestingly enough from the 7.2v “Backup” Battery (Let’s not get in to why a backup battery is a primary power source, I perfer to call it auxilliary battery) so if that dies, so does the camera, which does tend to kill the battery quickly, so I recommend use of the in-circuit recharger released by IFI.