View Single Post
  #2   Spotlight this post!  
Unread 15-02-2016, 15:49
klhutchi klhutchi is offline
Registered User
FRC #5736
 
Join Date: Feb 2016
Location: New York
Posts: 7
klhutchi is an unknown quantity at this point
Re: PCM output LED not lighting

package org.usfirst.frc.team5736.robot;

import edu.wpi.first.wpilibj.SampleRobot;
import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.DoubleSolenoid;
import edu.wpi.first.wpilibj.Joystick;

public class Robot extends SampleRobot {

Joystick stick;
DoubleSolenoid gearShift;

public void robotInit() {

stick = new Joystick(0);
gearShift = new DoubleSolenoid(0, 1);

}

public void teleopInit() {

gearShift.set(DoubleSolenoid.Value.kForward);

}

public void teleopPeriodic() {

if (stick.getRawButton(2)) {
gearShift.set(DoubleSolenoid.Value.kForward);
}
else if (stick.getRawButton(3)) {
gearShift.set(DoubleSolenoid.Value.kReverse);
}

Timer.delay(.005);
}

}