This commit is contained in:
samuel desharnais
2024-02-05 20:24:04 -05:00
parent 18bc9052da
commit c257411505
3 changed files with 78 additions and 4 deletions

View File

@ -0,0 +1,27 @@
// Copyright (c) FIRST and other WPILib contributors.
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
package frc.robot.subsystem;
import edu.wpi.first.wpilibj.AddressableLED;
import edu.wpi.first.wpilibj.AddressableLEDBuffer;
import edu.wpi.first.wpilibj2.command.SubsystemBase;
public class LED extends SubsystemBase {
/** Creates a new LED. */
public LED() {}
AddressableLED led = new AddressableLED(9);
AddressableLEDBuffer ledBuffer = new AddressableLEDBuffer(60);
public void led(){
led.setData(ledBuffer);
led.start();
}
public void couleur(int R, int G, int B){
ledBuffer.setRGB(0, R, G, B);
}
@Override
public void periodic() {
// This method will be called once per scheduler run
}
}