From bb8b80c3b959e652e0fe967f8d144898434ee345 Mon Sep 17 00:00:00 2001 From: OlivierDubois Date: Thu, 18 Jan 2024 19:27:11 -0500 Subject: [PATCH] balayeuse --- src/main/java/frc/robot/subsystem/Balayeuse.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/main/java/frc/robot/subsystem/Balayeuse.java b/src/main/java/frc/robot/subsystem/Balayeuse.java index d7240e0..c541879 100644 --- a/src/main/java/frc/robot/subsystem/Balayeuse.java +++ b/src/main/java/frc/robot/subsystem/Balayeuse.java @@ -4,12 +4,26 @@ package frc.robot.subsystem; +import com.ctre.phoenix.motorcontrol.can.TalonSRX; +import com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX; +import com.revrobotics.CANSparkMax; + import edu.wpi.first.wpilibj2.command.SubsystemBase; public class Balayeuse extends SubsystemBase { - /** Creates a new Balayeuse. */ + /** Creates a new Balayeuse. */ + public Balayeuse() {} + final WPI_TalonSRX Moteur = new WPI_TalonSRX(0); + final TalonSRX Moteur2 = new TalonSRX(1); + public void Accumulation(double vitesse){ + Moteur.set(vitesse); + } + public void balayeuse(){ + Moteur2.follow(Moteur); + Moteur2.setInverted(true); + } @Override public void periodic() { // This method will be called once per scheduler run