33 lines
957 B
Java
33 lines
957 B
Java
// 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.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;
|
|
import frc.robot.Constants;
|
|
|
|
public class Balayeuse extends SubsystemBase {
|
|
/** Creates a new Balayeuse. */
|
|
|
|
public Balayeuse() {}
|
|
final WPI_TalonSRX Moteur = new WPI_TalonSRX(Constants.Moteur);
|
|
final TalonSRX Moteur2 = new TalonSRX(Constants.Moteur2);
|
|
|
|
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
|
|
}
|
|
}
|