Class LEDStrip
java.lang.Object
org.chsrobotics.lib.hardware.ledStrip.LEDStrip
Convenience wrapper around an addressable LED strip (WS2812 or 2811).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
setAnimation
(LEDAnimation animation) Sets the currently displayed LEDAnimation.void
setFrame
(LEDAnimationFrame frame) Sets the currently displayed LEDAnimation to an animation consisting of only a given frame.void
update()
Advances to the next step of the animation.
-
Constructor Details
-
LEDStrip
public LEDStrip(int PWMChannel, int length) Constructs a new LEDStrip.- Parameters:
PWMChannel
- PWM channel to use to send data to the strip.length
- The number of pixels in the strip.
-
-
Method Details
-
setAnimation
Sets the currently displayed LEDAnimation.- Parameters:
animation
- The LEDAnimation to play through.
-
setFrame
Sets the currently displayed LEDAnimation to an animation consisting of only a given frame.- Parameters:
frame
- The LEDAnimationFrame to display.
-
update
public void update()Advances to the next step of the animation.
-