-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBlower.java
More file actions
34 lines (25 loc) · 798 Bytes
/
Blower.java
File metadata and controls
34 lines (25 loc) · 798 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// 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.ctre.phoenix6.hardware.TalonFX;
import edu.wpi.first.wpilibj2.command.SubsystemBase;
public class Blower extends SubsystemBase {
/** Creates a new Blower. */
TalonFX blowerMotor;
double motorSpeed = 0;
int deviceId = 0;
private static Blower mInstance;
public static Blower getInstance() {
if (mInstance == null) {
mInstance = new Blower();
}
return mInstance;
}
private Blower(){
blowerMotor = new TalonFX(deviceId);
}
public void setMotorSpeed(double speed){
blowerMotor.set(speed);
}
}