diff --git a/src/main/java/frc/robot/Constants.java b/src/main/java/frc/robot/Constants.java new file mode 100644 index 0000000..1343530 --- /dev/null +++ b/src/main/java/frc/robot/Constants.java @@ -0,0 +1,20 @@ +package frc.robot; + +public class Constants { + + //Moteur + public static int lanceur = 0; + public static int avantdroitDrive = 1; + public static int avantdroitAngle = 2; + public static int avantgaucheDrive = 3; + public static int avantgaucheAngle = 4; + public static int arrieredroitDrive = 5; + public static int arrieredroitAngle = 6; + public static int arrieregaucheDrive = 7; + public static int arrieregaucheAngle = 8; + public static int accumulateur = 9; + + //limit switch + public static int ballon = 10; + +} diff --git a/src/main/java/frc/robot/subsystems/Lanceur.java b/src/main/java/frc/robot/subsystems/Lanceur.java new file mode 100644 index 0000000..de24340 --- /dev/null +++ b/src/main/java/frc/robot/subsystems/Lanceur.java @@ -0,0 +1,26 @@ +// 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.revrobotics.CANSparkMax; +import com.revrobotics.CANSparkMaxLowLevel.MotorType; +import edu.wpi.first.wpilibj2.command.SubsystemBase; +import frc.robot.Constants; + +public class Lanceur extends SubsystemBase { + + final CANSparkMax lanceur = new CANSparkMax(Constants.lanceur, MotorType.kBrushless); + + public Lanceur() {} + + public void lancer(double vitesse){ + lanceur.set(vitesse); + } + + @Override + public void periodic() { + // This method will be called once per scheduler run + } +}