elevateur

This commit is contained in:
Antoine PerreaultE 2025-01-27 19:11:22 -05:00
parent edbff8f4dd
commit b16d11b70a

View File

@ -0,0 +1,27 @@
// 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 edu.wpi.first.wpilibj.DigitalInput;
import edu.wpi.first.wpilibj.motorcontrol.Spark;
import edu.wpi.first.wpilibj2.command.SubsystemBase;
import com.revrobotics.spark.SparkMax;
import com.revrobotics.spark.SparkLowLevel.MotorType;
public class Elevateur extends SubsystemBase {
/** Creates a new Elevateur. */
public Elevateur() {}
final SparkMax monte = new SparkMax(0, MotorType.kBrushless);
final DigitalInput limit2 = new DigitalInput(0);
public double positionL2(double position){
return monte.getEncoder().getPosition();
}
public void vitesseL2(double vitesse){
monte.set(vitesse);
}
@Override
public void periodic() {
// This method will be called once per scheduler run
}
}