|
Re: Using kevin's code for driving and camera tracking
Here's what I have done so far. I have reassigned the
joystick #1 y-axis parameter (p1_y) to go directly
to pwm03 and pwm04. You can see that I have commented
out the calls to pwm01 and pwm02 since we are using
them also for the camera. Since pwm03 and pwm04
are the same value, the drive motors must be set up
so that they both drive in the same direction when
connected. I hope this helps. I haven't tried it yet
in our robot, but I think it should work.
/*---------- Analog Inputs (Joysticks) to PWM Outputs-----------------------
*--------------------------------------------------------------------------
* This maps the joystick axes to specific PWM outputs.
*/
//pwm01 = p1_y; /* Camera Pan Servo */
//pwm02 = p2_y; /* Camera Tilt Servo */
pwm03 = p1_y; /* was pwm03 = p3_y */
pwm04 = p1_y; /* was pmw04 = p4_y */
__________________
Marc Center 
FIRST FRC Mentor/Coach - Team 3548 Royal Oak RoboRavens#2 - on Sabbatical 2017 season
marc.center@gmail.com
Mobile: 248-255-7377
|