Quote:
Originally Posted by tmccalister
Thank you so much sir. You are a gentleman and a scholar so...
Servo supershifter = new servo (1); ?
Then how would I set it to change between gears?
|
I myself use the set() method so here's some java pseudo code for controlling it with joystick buttons. This assumes you want the servo to go through the full range of motion from 0 to 1. There is also a setAngle() method you could use.
Code:
if (buttonIsPressed()) {
servo.set(1);
} else if (anotherButtonIsPressed()) {
servo.set(0);
}