|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: PCM output LED not lighting
We are in java code. Will post below, We hardwired the solenoid to at 24V battery series and got it to light up, also manual fired the Solenoids with the blue screws at the top.
|
|
#2
|
|||
|
|||
|
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); } } |
|
#3
|
|||
|
|||
|
Re: PCM output LED not lighting
We fixed it. The issue was that we were using SampleRobot rather than IterativeRobot. The teleoperated commands are not contained within SampleRobot.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|