Programming a super shifter/gearbox

How? Programming four motors as the wheel is simple but how do you set the actual super shifter to change between high gear, low gear.

If I understand you question it’s usually shifted by either a sever (special kit) or pneumatic cylinder (also a special kit). Most team prefer the pneumatic option because it’s more rugged and lower shift time.

I’m no expert but no one else has replied. Anything said above could be false.

Find out from your electronics/pneumatics people how the solenoids work, and look at the Solenoid class in wpilibj to get started on controlling them. If you need someone to review the code, I’d be happy to take a look.

Its just a gear box that has a port that goes into your digital sidecar. it allows it to switch your motors from a larger gear to a smaller gear, kind of like a bicycle.

I know how to program it I just need to know how to program this specific gearbox. I can post a picture if you need it.

The simplest method of programming a shifting gearbox is to map one button on the joystick or game pad to control the shifting pneumatic cylinder, and hen do tank or arcade drive as desired.

In this case, the CIM motors are programmed exactly the same as a regular single speed gearbox. Then program your desired trigger button on the joystick to control the solenoid. Drive without the button pressed, and it is in low gear. Press and hold the trigger button, it shifts to high gear.

That makes a lot of sense. But this isnt a pneumatic so theres no solenoid. its just a small piece that moves up down. and changes from a smaller gear to a higher gear. I understand the theory behind it I just don’t know what the class is for the gear box. It plugs in where the jaguars go but I think I would encounter problems if I programmed it as a jaguar. (sorry im a little confused about this because the electronics team doesnt really know how to put this together.)

You are describing a servo. So you would program this as a servo object presuming it is like or is a Hitec HS-322

http://www.trossenrobotics.com/store/p/3289-Hitec-HS-322HD-standard-hobby-servo.aspx

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.


if (buttonIsPressed()) {
    servo.set(1);
} else if (anotherButtonIsPressed()) {
    servo.set(0);
}

I figured it was that so I had put it in and it told me it was wrong. then I realized i forgot to capitalize servo. -_- gotta love programming.