Need help Programming and wiring camera!

Hi. I am the main programmer on our team and I know very little about programming. I need some help programming the camera.

On our robot we have a turntable motor to affect the yaw of the shooting mechanism and leadscrew motor to affect the pitch of the shooting mechanism. Basically what I want the camera to be able to do is the turntable motor and leadscrew motor to act as the two servos on the camera. I want it to be able to track the green light and then shoot whne the switch on the controller is activated.

Also I want to be able to flip a switch back a forth to be able to toggle between camera mode and a mode where another joystich on the controller can manually conrtol the shooting mechanism.

I am a horrible programmer and I have no idea how to use easyC. I have tried to use EasyC, but it just seems to make it a lot harder than just using mplab.

If anyone has anyi idea of how I can get this done and wire the camera please post. Any help would be greatly appreciated. Thanks.

To aim your shooting mechanism some sort of feedback is needed which tells you where your “turret” is pointing.

Our programmer set up a Turret_Tracking() function. Inside of that check the joystick button to either assign the joystick x,y values to your turret motors or to map the camera tracking to the turret tracking.

Just use mplab and its text editor. That is the simplest and easiest way.

For wiring and setting up the camera refer to the FAQ at the top of the CMUcam subforum.