com.qualcomm.robotcore.hardware

## Interface Blinker

- All Known Implementing Classes:
    LightBlinker

      public interface Blinker

  `Blinker` provides the means to control an LED or a light that can be illuminated in a sequenced pattern of colors and durations.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static class` | `Blinker.Step` `Blinker.Step` represents a particular color held for a particular length of time.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getBlinkerPatternMaxLength()` Returns the maximum number of `Blinker.Step`s that can be present in a pattern
    `java.util.Collection<Blinker.Step>` | `getPattern()` Returns the current blinking pattern
    `boolean` | `patternStackNotEmpty()` Returns whether the pattern stack is currently nonempty.
    `boolean` | `popPattern()` Pops the next pattern off of the stack of saved patterns, if any.
    `void` | `pushPattern(java.util.Collection<Blinker.Step> steps)` Saves the existing pattern such that it can be later restored, then calls setPattern().
    `void` | `setConstant(int color)` Sets the blinker pattern to be a single, unchanging color
    `void` | `setPattern(java.util.Collection<Blinker.Step> steps)` Sets the pattern with which this LED or light should illuminate.
    `void` | `stopBlinking()` Sets the blinker to constant black and frees any internal resources

- - ### Method Detail

    - #### setPattern

          void setPattern(java.util.Collection<Blinker.Step> steps)

      Sets the pattern with which this LED or light should illuminate. If the list of steps is longer than the maximum number supported, then the pattern is truncated.
      Parameters:
        `steps` - the pattern of colors and durations that the LED or light should illuminate itself with

    - #### getPattern

          java.util.Collection<Blinker.Step> getPattern()

      Returns the current blinking pattern
      Returns:
        the current blinking pattern

    - #### pushPattern

          void pushPattern(java.util.Collection<Blinker.Step> steps)

      Saves the existing pattern such that it can be later restored, then calls setPattern().
      Parameters:
        `steps` - the new pattern to be displayed

    - #### patternStackNotEmpty

          boolean patternStackNotEmpty()

      Returns whether the pattern stack is currently nonempty.
      Returns:
        whether the pattern stack is currently nonempty.

    - #### popPattern

          boolean popPattern()

      Pops the next pattern off of the stack of saved patterns, if any. If the stack is empty, then this sets the blinker to a constant black.
      Returns:
        whether or not a pattern was removed from the stack (ie: whether the pattern stack was not empty prior to the call

    - #### setConstant

          void setConstant(int color)

      Sets the blinker pattern to be a single, unchanging color
      Parameters:
        `color` - the color with which the LED or light should be illuminated

    - #### stopBlinking

          void stopBlinking()

      Sets the blinker to constant black and frees any internal resources

    - #### getBlinkerPatternMaxLength

          int getBlinkerPatternMaxLength()

      Returns the maximum number of `Blinker.Step`s that can be present in a pattern
      Returns:
        the maximum number of `Blinker.Step`s that can be present in a pattern