diff --git a/src/main/java/frc4388/robot/RobotMap.java b/src/main/java/frc4388/robot/RobotMap.java index 5f17853..4d2aa53 100644 --- a/src/main/java/frc4388/robot/RobotMap.java +++ b/src/main/java/frc4388/robot/RobotMap.java @@ -13,6 +13,8 @@ import com.ctre.phoenix.motorcontrol.can.WPI_TalonFX; import com.ctre.phoenix.sensors.PigeonIMU; import edu.wpi.first.wpilibj.motorcontrol.Spark; +import edu.wpi.first.wpilibj.PneumaticsModuleType; +import edu.wpi.first.wpilibj.Solenoid; import edu.wpi.first.wpilibj.drive.DifferentialDrive; import frc4388.robot.Constants.LEDConstants; import frc4388.utility.RobotGyro; @@ -22,7 +24,6 @@ import frc4388.utility.RobotGyro; * testing and modularization. */ public class RobotMap { - public RobotMap() { configureLEDMotorControllers(); configureDriveMotorControllers(); @@ -30,6 +31,7 @@ public class RobotMap { /* LED Subsystem */ public final Spark LEDController = new Spark(LEDConstants.LED_SPARK_ID); + public final Solenoid clawSolenoid = new Solenoid(PneumaticsModuleType.CTREPCM, -1); void configureLEDMotorControllers() { diff --git a/src/main/java/frc4388/robot/subsystems/Claw.java b/src/main/java/frc4388/robot/subsystems/Claw.java new file mode 100644 index 0000000..22bd440 --- /dev/null +++ b/src/main/java/frc4388/robot/subsystems/Claw.java @@ -0,0 +1,26 @@ +// 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 frc4388.robot.subsystems; + +import edu.wpi.first.wpilibj.Solenoid; +import edu.wpi.first.wpilibj2.command.SubsystemBase; + +public class Claw extends SubsystemBase { + private Solenoid m_clawSolenoid; + + /** Creates a new Claw. */ + public Claw(Solenoid clawSolenoid) { + m_clawSolenoid = clawSolenoid; + } + + void setClaw(boolean open) { + m_clawSolenoid.set(open); + } + + @Override + public void periodic() { + + } +}