I am using the user default code ver2.4. How do program it to track a color?
Did you Calibrate the colors first??
First you need to calibrate to get the correct exposure settings. Put these into user_routines.c where indicated. Then, connect your left motors to pwm12 and the right motors to pwm11. The default 2.4 code uses a one joystick drive (port 1 - use the calibration wheels on the joystick to get the motors to neutral) but you still need two joysticks connected to the OI. Once you load the code, press the trigger on the joystick you have connected to port two. This will cycle through the five colors and light up the red LEDs on the OI. They go in order from top to bottom :Yellow, Green, White, Red, Blue. If you calibrated correctly and have the servos mounted, each time you select a new color the camera should recenter itself and then begin tracking the color.
Edit: Also make sure your converter card, power wire, and backup battery are connected correctly.
How do you tell the camera what color to track?
Call the function camera_find_color(); and in the parentheses put the color you want it to find in capital letters. I dont know if the caps matter but I know it works with caps.
Searching for the root of our problem, i tried to do all of this… but didn’t work. All the connections seems to be fine (TTL on RC, pwm on TTL and Camera, pwm on RC and Camera, backup battery full charged, etc.)…
BUT DIDN’T WORK!
I really don’t know what can I do to the camera give some life signal…
OH! :eek: Almoust forgotting… With the default code 2.4, the camera keep a green and a red LED on, but the terminal window of the IFI loader says: “Camera not Found! please check, power and cable connections.”
and in the OI, all the four red lights from PWM Outputs are blinking, even if I press the triggers, or any button on the joysticks… PLEASE HELP!!!
If someone wants more information, like photos of connections or any other doubts, just ask me =D