View Single Post
  #15   Spotlight this post!  
Unread 13-03-2007, 18:19
Culvan Van Li's Avatar
Culvan Van Li Culvan Van Li is offline
Jack-Of-All-Trades
AKA: Andy
FRC #1939 (Kuh-Nig-Its)
Team Role: Engineer
 
Join Date: Sep 2006
Rookie Year: 2006
Location: Kansas City, MO
Posts: 36
Culvan Van Li is on a distinguished road
Re: Attaching the CMUcam to the Vex controller

I'm trying to connect a CMU2 camera to my vex kit. Electrically I think I've got everything working. I'm using PWM1&2 for the pan/tilt and I'm using PWM3 to power the camera. I made a custom cable to connect the TTL serial to the VEX ports that are next to the digital16 port. I've got a laptop setup with the programming kit/cable and I've got a second laptop connected to the RS232 serial port on the camera monitoring it with Procom plus.

I've been adding in modules from Kevin Watson's frc_camera_s_21 set. I've used the instructions in the readme files to add serial_ports.c/h, camera.c/h, tracking.c/h, terminal.c/h. I've added in the following commands into the Process data from master routine:

Tracking_Info_Terminal();
Camera_Handler();
Servo_Track();

I've also turned on debugging. When it fires up it runs through the initilization and I can see it perform all 17 steps. The servos start panning all ofer the place and I get "searching..." messages. The camera never seems to lock onto anything (incluging my green target). I tried using it with labview's software and I can pull an image and check the color of my target. It comes up with 235+/-5 for all three colors. I tried changing the settings in camera.h to match those, but I can't get it to pick anything up. I get T packets with a parenthesis after it. I'm assuming that's because I'm in raw mode.

Anyone have any good suggestions of what to try next? I can get the camera working in non-raw mode directly to my computer running procomm plus, but I'm struggling to get it working with the vex kit.

Andy
Reply With Quote