diff --git a/src/main/java/frc/robot/Constants.java b/src/main/java/frc/robot/Constants.java new file mode 100644 index 0000000..947e0ab --- /dev/null +++ b/src/main/java/frc/robot/Constants.java @@ -0,0 +1,11 @@ +// 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; + +/** Add your docs here. */ +public class Constants { + //moteur + public static int lanceur = 1; +} diff --git a/src/main/java/frc/robot/subsystem/Lanceur.java b/src/main/java/frc/robot/subsystem/Lanceur.java index e155c1e..e7d0c57 100644 --- a/src/main/java/frc/robot/subsystem/Lanceur.java +++ b/src/main/java/frc/robot/subsystem/Lanceur.java @@ -4,14 +4,29 @@ package frc.robot.subsystem; +import com.revrobotics.CANSparkMax; +import com.revrobotics.CANSparkLowLevel.MotorType; + + import edu.wpi.first.wpilibj2.command.SubsystemBase; +import frc.robot.Constants; public class Lanceur extends SubsystemBase { /** Creates a new Lanceur. */ + + public Lanceur() {} + final CANSparkMax lancer = new CANSparkMax(Constants.lanceur, MotorType.kBrushless); + public void lancer(double vitesse){ + lancer.set(vitesse); + + } + + + @Override - public void periodic() { + public void periodic() {} // This method will be called once per scheduler run - } + }