View Single Post
  #30   Spotlight this post!  
Unread 24-06-2014, 12:49
adciv adciv is offline
One Eyed Man
FRC #0836 (RoboBees)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2010
Location: Southern Maryland
Posts: 478
adciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to all
Re: Pneumatics system code

It needs to be plugged into the Rleay section. Lets go from there. By plugging it into the DIO, you're setting it to reverse, as the reverse pin in the Spike is getting the 5V from the DIO. Lets try setting it to reverse in code while it's on the relay panel.

Code:
    public void operatorControl() {
        chassis.setSafetyEnabled(true);
        while (isOperatorControl() && isEnabled()) {
            double speed = mainStick.getY();
            double rot = -mainStick.getX();
            chassis.arcadeDrive (speed, rot);

            // Solenoid
                spike.set(Relay.Value.kReverse);
        }
    }
__________________
Quote:
Originally Posted by texarkana View Post
I would not want the task of devising a system that 50,000 very smart people try to outwit.