Lanceur + Constants

This commit is contained in:
Antoine PerreaultE 2023-10-18 19:21:57 -04:00
parent c28356861e
commit 9761b4f120
2 changed files with 46 additions and 0 deletions

View File

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

View File

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