-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIntake.java
More file actions
41 lines (30 loc) · 869 Bytes
/
Intake.java
File metadata and controls
41 lines (30 loc) · 869 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
35
36
37
38
39
40
41
package frc.robot.commands;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import edu.wpi.first.wpilibj2.command.CommandBase;
import frc.robot.subsystems.ArmSubsystem;
import frc.robot.subsystems.ArmSubsystem.ArmPositions;
public class Intake extends CommandBase {
private ArmSubsystem arm;
public Intake(){
}
@Override
public void initialize() {
arm.setIntakeMotorPower(0.0);
arm.setShooterMotorPower(0.0);
}
public void shoot(){
arm.setIntakeMotorPower(0.5);
arm.setShooterMotorPower(0.5);
}
public void spit(){
arm.setIntakeMotorPower(-0.5);
arm.setShooterMotorPower(-0.5);
}
public void stop(){
arm.setIntakeMotorPower(0.0);
arm.setShooterMotorPower(0.0);
}
public void home(){
arm.setMode(ArmPositions.Home);
}
}