Package edu.wpi.first.wpilibj
Interface LEDWriter
- All Known Implementing Classes:
AddressableLEDBuffer,AddressableLEDBufferView
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Generic interface for writing data to an LED buffer.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidsetHSV(int index, int h, int s, int v) Sets a specific led in the buffer.default voidSets the RGB value for an LED at a specific index on a LED buffer.default voidSets the RGB value for an LED at a specific index on a LED buffer.voidsetRGB(int index, int r, int g, int b) Sets the RGB value for an LED at a specific index on a LED buffer.
-
Method Details
-
setRGB
Sets the RGB value for an LED at a specific index on a LED buffer.- Parameters:
index- the index of the LED to write tor- the value of the red channel, in [0, 255]g- the value of the green channel, in [0, 255]b- the value of the blue channel, in [0, 255]
-
setHSV
Sets a specific led in the buffer.- Parameters:
index- the index to writeh- the h value [0-180)s- the s value [0-255]v- the v value [0-255]
-
setLED
Sets the RGB value for an LED at a specific index on a LED buffer.- Parameters:
index- the index of the LED to write tocolor- the color to set
-
setLED
Sets the RGB value for an LED at a specific index on a LED buffer.- Parameters:
index- the index of the LED to write tocolor- the color to set
-