If you don't ease off of the power when you shift you will hear the most gut wrenching sound of gears at high speed crunching...we haven't managed to break anything since changing gears during autonomous mode wasn't really necessary last year and our driver slowed down when shifting during teleoperated mode.
I've been doing a bit of sensor code testing with our 2007 robot since I can't get any time with the '08 bot yet and I have noticed that after too many high speed shifts the servos tend to not make the gears mesh like they used to. I guess what I'm saying is, don't try your luck with the servos.
For your first question, I'll post the code that we used to make our servos go ^_^ We used a PWM Y cable to connect both servos to a single PWM output.
This part was in our Default Routine function (HIGH is defined as 1 and LOW as 0)
Code:
if (p1_sw_top || p2_sw_top) {gear = HIGH;}
if (p1_sw_trig || p2_sw_trig) {gear = LOW;}
Set_Gear(gear);
This is the Set_Gear function (the else is a just in case thing ^_^)
Code:
void Set_Gear(char set)
{
if (set == LOW)
{
pwm05 = 255;
}
else if (set == HIGH)
{
pwm05 = 0;
}
else
{
pwm05 = 127;
}
}
This made it so that the top buttons for either the first or second controllers shifted to high and either trigger shifted to low.