Class OnBoardIO

java.lang.Object
edu.wpi.first.wpilibj.romi.OnBoardIO

public class OnBoardIO extends Object
This class represents the onboard IO of the Romi reference robot. This includes the pushbuttons and LEDs.

DIO 0 - Button A (input only) DIO 1 - Button B (input) or Green LED (output) DIO 2 - Button C (input) or Red LED (output) DIO 3 - Yellow LED (output only)

  • Constructor Details

  • Method Details

    • getButtonAPressed

      public boolean getButtonAPressed()
      Gets if the A button is pressed.
      Returns:
      Whether or not Button A is pressed
    • getButtonBPressed

      public boolean getButtonBPressed()
      Gets if the B button is pressed.
      Returns:
      Whether or not Button B is pressed
    • getButtonCPressed

      public boolean getButtonCPressed()
      Gets if the C button is pressed.
      Returns:
      Whether or not Button C is pressed
    • setGreenLed

      public void setGreenLed(boolean value)
      Sets the green LED.
      Parameters:
      value - Set whether or not to turn the Green LED on
    • setRedLed

      public void setRedLed(boolean value)
      Sets the red LED.
      Parameters:
      value - Set whether or not to turn the Red LED on
    • setYellowLed

      public void setYellowLed(boolean value)
      Sets the yellow LED.
      Parameters:
      value - Set whether or not to turn the Yellow LED on