-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from MEFThunders-7035/LedSystem
add an LED System, should be ready to use when wanted
- Loading branch information
Showing
10 changed files
with
314 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,6 +46,7 @@ | |
"AHRS", | ||
"Brushless", | ||
"Deadband", | ||
"Feedforward", | ||
"intaking", | ||
"Odometry", | ||
"Roborio", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package frc.robot.commands; | ||
|
||
import edu.wpi.first.wpilibj.XboxController; | ||
import edu.wpi.first.wpilibj2.command.PrintCommand; | ||
import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; | ||
import frc.robot.Constants.IntakeConstants; | ||
import frc.robot.subsystems.ArmSubsystem; | ||
import frc.robot.subsystems.IntakeSubsystem; | ||
|
||
public class SmartIntakeCommand extends SequentialCommandGroup { | ||
public SmartIntakeCommand( | ||
IntakeSubsystem intakeSubsystem, ArmSubsystem armSubsystem, XboxController controller) { | ||
super( | ||
armSubsystem | ||
.setArmToPositionCommand(0) | ||
.onlyIf(() -> !intakeSubsystem.hasNote()) | ||
.beforeStarting(new PrintCommand("Setting Arm to 0")) | ||
.andThen( | ||
intakeSubsystem.run( | ||
() -> intakeSubsystem.setIntakeSpeed(IntakeConstants.kIntakeSpeed))) | ||
.alongWith(intakeSubsystem.vibrateControllerOnNoteCommand(controller))); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package frc.robot.subsystems; | ||
|
||
import edu.wpi.first.wpilibj.util.Color; | ||
import frc.robot.Constants.LEDConstants; | ||
import frc.utils.BetterLED; | ||
|
||
public final class LEDSystem { | ||
private static final BetterLED strip = | ||
new BetterLED(LEDConstants.kLedPin, LEDConstants.kLedCount); | ||
|
||
public static void setLEDColorRGB(int r, int g, int b) { | ||
strip.fill(new Color(r, g, b)); | ||
} | ||
} |
Oops, something went wrong.