This commit is contained in:
samuel desharnais 2024-01-18 19:26:28 -05:00
parent daf18d0618
commit a8446a2cd1
2 changed files with 28 additions and 2 deletions

View File

@ -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;
}

View File

@ -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
}
}