This commit is contained in:
parent
ef06de2957
commit
c14b294395
@ -8,6 +8,7 @@ import com.pathplanner.lib.auto.AutoBuilder;
|
|||||||
import com.pathplanner.lib.auto.NamedCommands;
|
import com.pathplanner.lib.auto.NamedCommands;
|
||||||
import edu.wpi.first.cameraserver.CameraServer;
|
import edu.wpi.first.cameraserver.CameraServer;
|
||||||
import edu.wpi.first.math.MathUtil;
|
import edu.wpi.first.math.MathUtil;
|
||||||
|
import edu.wpi.first.wpilibj.Relay;
|
||||||
import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard;
|
import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard;
|
||||||
import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab;
|
import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab;
|
||||||
import edu.wpi.first.wpilibj.smartdashboard.SendableChooser;
|
import edu.wpi.first.wpilibj.smartdashboard.SendableChooser;
|
||||||
@ -56,9 +57,11 @@ public class RobotContainer {
|
|||||||
Lanceur lanceur = new Lanceur();
|
Lanceur lanceur = new Lanceur();
|
||||||
Limelight limelight = new Limelight();
|
Limelight limelight = new Limelight();
|
||||||
LED LED = new LED();
|
LED LED = new LED();
|
||||||
CommandJoystick joystick = new CommandJoystick(0);
|
CommandJoystick joystick = new CommandJoystick(0);
|
||||||
CommandXboxController manette = new CommandXboxController(1);
|
CommandXboxController manette = new CommandXboxController(1);
|
||||||
|
/*private final Relay blue = new Relay(0);
|
||||||
|
private final Relay rouge = new Relay(1);
|
||||||
|
private final Relay vert = new Relay(2);*/
|
||||||
//command
|
//command
|
||||||
PistonFerme pistonFerme = new PistonFerme(grimpeur);
|
PistonFerme pistonFerme = new PistonFerme(grimpeur);
|
||||||
Balayer balayer = new Balayer(balayeuse, accumulateur);
|
Balayer balayer = new Balayer(balayeuse, accumulateur);
|
||||||
|
@ -6,13 +6,16 @@ package frc.robot.subsystem;
|
|||||||
|
|
||||||
import edu.wpi.first.wpilibj.AddressableLED;
|
import edu.wpi.first.wpilibj.AddressableLED;
|
||||||
import edu.wpi.first.wpilibj.AddressableLEDBuffer;
|
import edu.wpi.first.wpilibj.AddressableLEDBuffer;
|
||||||
|
import edu.wpi.first.wpilibj.Relay;
|
||||||
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
||||||
|
|
||||||
public class LED extends SubsystemBase {
|
public class LED extends SubsystemBase {
|
||||||
/** Creates a new LED. */
|
/** Creates a new LED. */
|
||||||
public LED() {}
|
public LED() {}
|
||||||
|
|
||||||
AddressableLED led = new AddressableLED(9);
|
AddressableLED led = new AddressableLED(9);
|
||||||
AddressableLEDBuffer ledBuffer = new AddressableLEDBuffer(150);
|
AddressableLEDBuffer ledBuffer = new AddressableLEDBuffer(150);
|
||||||
|
|
||||||
public void led(){
|
public void led(){
|
||||||
led.setData(ledBuffer);
|
led.setData(ledBuffer);
|
||||||
led.start();}
|
led.start();}
|
||||||
@ -21,10 +24,7 @@ public class LED extends SubsystemBase {
|
|||||||
for (int i = 0; i < ledBuffer.getLength(); i++) {
|
for (int i = 0; i < ledBuffer.getLength(); i++) {
|
||||||
// Sets the specified LED to the RGB values for red
|
// Sets the specified LED to the RGB values for red
|
||||||
ledBuffer.setRGB(i, 255, 0, 0);}
|
ledBuffer.setRGB(i, 255, 0, 0);}
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void periodic() {
|
public void periodic() {
|
||||||
// This method will be called once per scheduler run
|
// This method will be called once per scheduler run
|
||||||
|
Loading…
x
Reference in New Issue
Block a user