Your First AdvantageKit Subsystem
What is a Subsystem
In FRC one of the end goals of the software is often for the robot to interact or move something in the physical world. To do this we want to split our robot into smaller pieces to make it easier to write and predict what the software will do. Therefore a subsystem is a pair of hardware and software that is responsible for a small part of the robots function. For example the claw from last year was a subsystem that was responsible for its single motor that allowed it to intake and score game pieces.
Components of a Subsystem
A subsystem has hardware that we would like to control and get data from. We are only ever doing 2 things with a subsystem: getting inputs or setting io outputs.
Inputs
any
public boolean getIsLinebreakOne()
{
return inputs.isLinebreakOne;
}