Module fini

This commit is contained in:
Samuel
2026-02-02 20:25:50 -05:00
parent ecf2365eaf
commit 50a686a5d6
15 changed files with 1261 additions and 1 deletions

View File

@@ -0,0 +1,40 @@
// 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.spark.SparkFlex;
import com.revrobotics.spark.SparkMax;
import com.revrobotics.spark.SparkLowLevel.MotorType;
import edu.wpi.first.wpilibj.DigitalInput;
import edu.wpi.first.wpilibj2.command.SubsystemBase;
public class Balayeuse extends SubsystemBase {
SparkFlex Balaye = new SparkFlex(5, MotorType.kBrushless);
SparkMax Pivot = new SparkMax(6, MotorType.kBrushless);
DigitalInput limit = new DigitalInput(0);
public void Balayer(double vitesse){
Balaye.set(vitesse);
}
public void Pivoter(double vitesse){
Pivot.set(vitesse);
}
public double Distance(){
return Pivot.getEncoder().getPosition();
}
public void Reset(){
Pivot.getEncoder().setPosition(0);
}
public boolean GetLimiSwtich(){
return limit.get();
}
/** Creates a new Balayeuse. */
public Balayeuse() {}
@Override
public void periodic() {
// This method will be called once per scheduler run
}
}