Skip to content

Commit

Permalink
Made the motor brushless in code
Browse files Browse the repository at this point in the history
Changed it from a Spark object to a CANSparkMax object.
  • Loading branch information
AraReighard committed Jan 25, 2024
1 parent 329f0fb commit 165e832
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/java/frc/robot/subsystems/Intake.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

package frc.robot.subsystems;

import com.revrobotics.CANSparkMax;
import com.revrobotics.CANSparkLowLevel.MotorType;

import edu.wpi.first.wpilibj.DigitalInput;
import edu.wpi.first.wpilibj.motorcontrol.Spark;
import edu.wpi.first.wpilibj2.command.SubsystemBase;
Expand All @@ -19,12 +22,12 @@
/** The intake of the robot. */
public class Intake extends SubsystemBase {

private Spark intake;
private CANSparkMax intake;
private DigitalInput limitSwitch;

/** Creates a new Intake. */
public Intake() {
this.intake = new Spark(Constants.Intake.INTAKE_MOTOR_ID);
this.intake = new CANSparkMax(Constants.Intake.INTAKE_MOTOR_ID, MotorType.kBrushless);
this.limitSwitch = new DigitalInput(Constants.Intake.INTAKE_LIMIT_SWITCH_DIO_PORT);
}

Expand Down

0 comments on commit 165e832

Please sign in to comment.