// 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.subsystems; import com.ctre.phoenix.led.CANdle; import com.ctre.phoenix.led.CANdleConfiguration; import com.ctre.phoenix.led.RainbowAnimation; import edu.wpi.first.wpilibj2.command.SubsystemBase; public class Bougie extends SubsystemBase { CANdle candle = new CANdle(5); CANdleConfiguration config = new CANdleConfiguration(); RainbowAnimation rainbowAnim = new RainbowAnimation(1, 0.5, 64); /** Creates a new Bougie. */ public Bougie() { config.brightnessScalar = 0.5; candle.configAllSettings(config); } public void Rouge() { candle.setLEDs(255, 0, 0); } public void Vert() { candle.setLEDs(0, 255, 0); } public void Bleu() { candle.setLEDs(0, 0, 255); } public void RainBow(){candle.animate(rainbowAnim);} public void RainBowStop(){candle.animate(null);} @Override public void periodic() { // This method will be called once per scheduler run } }