Class SN_Blinkin

java.lang.Object
edu.wpi.first.wpilibj.MotorSafety
edu.wpi.first.wpilibj.motorcontrol.PWMMotorController
edu.wpi.first.wpilibj.motorcontrol.Spark
com.frcteam3255.components.SN_Blinkin
All Implemented Interfaces:
edu.wpi.first.util.sendable.Sendable, edu.wpi.first.wpilibj.motorcontrol.MotorController, AutoCloseable

public class SN_Blinkin extends edu.wpi.first.wpilibj.motorcontrol.Spark
Custom REV Blinkin framework making it easier to set colors and patters over PWM

Use setPattern(PatternType) to set the color of the LEDs.

See https://www.revrobotics.com/content/docs/REV-11-1105-UM.pdf for information on how to wire, setup, and use the REV Blinkin

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Enum containing every REV Blinkin pattern
  • Field Summary

    Fields inherited from class edu.wpi.first.wpilibj.motorcontrol.PWMMotorController

    m_pwm
  • Constructor Summary

    Constructors
    Constructor
    Description
    SN_Blinkin(int PWMChannel)
    Create an SN_Blinkin
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Set the 5 volt (addressable) LED pattern.

    Methods inherited from class edu.wpi.first.wpilibj.motorcontrol.PWMMotorController

    addFollower, close, disable, enableDeadbandElimination, get, getChannel, getDescription, getInverted, getPwmHandle, getVoltage, initSendable, set, setInverted, stopMotor

    Methods inherited from class edu.wpi.first.wpilibj.MotorSafety

    check, checkMotors, feed, getExpiration, isAlive, isSafetyEnabled, setExpiration, setSafetyEnabled

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface edu.wpi.first.wpilibj.motorcontrol.MotorController

    setVoltage, setVoltage
  • Constructor Details

    • SN_Blinkin

      public SN_Blinkin(int PWMChannel)
      Create an SN_Blinkin
      Parameters:
      PWMChannel - PWM Port that Blinkin is plugged into on the roboRIO
  • Method Details

    • setPattern

      public void setPattern(SN_Blinkin.PatternType pattern)
      Set the 5 volt (addressable) LED pattern. Safe to use with 12 volt (non-addressable) LEDs. A 12V LED strip will show the patterns with the same color palette as the pattern selected
      Parameters:
      pattern - Pattern to display