View Single Post
  #5   Spotlight this post!  
Unread 01-02-2007, 21:45
kitscuzz's Avatar
kitscuzz kitscuzz is offline
Not alotta posts
AKA: Kit
FRC #1389 (Worst Case Scenario)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Home
Posts: 47
kitscuzz will become famous soon enough
Re: Programming with Two CMU Cams

You set up one camera normally through the TTL port with the TTL to 232 adapter. The second goes through a modified serial cable that connects the programming port to your camera.

The easiest way to simply test everything is to buy a ***null modem cable*** connector for your serial cable and simply plug the camera serial directly into the programming port.

To test whether or not it's working all you need to do is download the default camera code and change the line in camera.h from
// #define CAMERA_SERIAL_PORT_1

#define CAMERA_SERIAL_PORT_2

to

#define CAMERA_SERIAL_PORT_1

// #define CAMERA_SERIAL_PORT_2

IMPORTANT NOTES:
You won't have any terminal with two cameras. You must make sure that if you use both that you set
stdout_serial_port = NUL; in user_routines User_Initialization.

Some extra notes:
If you decide to modify the cable to go to a PWM output (which is what you'll do if you decide to go into competition with it) You'll need to ruin a serial (or make your own) and make the following connections:

1 0 2 3 0 << This is the serial port on your Robot controller
0 0 0 0

connect pin one to the black on a PWM, pin 2 to the red, and 3 to the white/yellow.

Last edited by kitscuzz : 01-02-2007 at 21:56.