Class FrcAddressableLED


public class FrcAddressableLED extends TrcAddressableLED
This class implements a platform dependent Addressable LED device. It uses the WPILib AddressableLED class and provides methods to update the color pattern of the LED strip.
  • Constructor Details

    • FrcAddressableLED

      public FrcAddressableLED(String instanceName, int numLEDs, int channel)
      Constructor: Create an instance of the object.
      Parameters:
      instanceName - specifies the instance name.
      numLEDs - specifies the number of LEDs on the strip.
      channel - specifies the PWM channel the device is on.
  • Method Details

    • reset

      public void reset()
      This method resets the LED strip by turning all LEDs off.
      Overrides:
      reset in class TrcPriorityIndicator<TrcAddressableLED.Pattern>
    • setEnabled

      public void setEnabled(boolean enabled)
      This method enables/disables the AddressableLED device.
      Parameters:
      enabled - specifies true to enable the device, false to disable.
    • updateLED

      public void updateLED(TrcColor[] colorPattern)
      This method update the LED strip to the current pattern.
      Specified by:
      updateLED in class TrcAddressableLED