Interface WS2811
-
- All Implemented Interfaces:
public interface WS2811Defines WS2811 aka NeoPixels.
NOTE: when using Java
Colorsettings, the brightness of the device will be applied to the colors. Example:p.brightness = .1 p.color = Color.REDwill result in an "actual" color of 25 (.1 * 255). This will conflict with adjusting the brightness of colors "manually" (e.g. if the value is 25 and brightness is .1, the actual value will be 2).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classWS2811.PixelColorWrapper for colors that includes an optional white level for devices that support that. An optional brightness can also be applied.
-
Method Summary
Modifier and Type Method Description Unitoff()Shorthand for fill(Color.BLACK)abstract Unitfill(WS2811.PixelColor color)Fill the entire device with this color. Unitfill(Color color)Fill the entire device with this color. Unitplus(WS2811.PixelColor color)Fill the entire device with this color. Unitplus(Color color)Fill the entire device with this color. abstract Unitset(Integer index, WS2811.PixelColor color)Set an individual pixel (this is available as an indexed value). Unitset(Integer index, Color color)Set an individual pixel (this is available as an indexed value). abstract Unitset(Integer start, Integer end, WS2811.PixelColor color)Set a range of pixels to a color. Unitset(Integer start, Integer end, Color color)Set a range of pixels to a color. abstract Unitset(Integer start, Integer end, List<WS2811.PixelColor> colors)Set a range of pixels to a range of colors. abstract BooleangetAutoWrite()abstract UnitsetAutoWrite(Boolean autoWrite)abstract FloatgetBrightness()abstract UnitsetBrightness(Float brightness)-
-
Method Detail
-
fill
abstract Unit fill(WS2811.PixelColor color)
Fill the entire device with this color. If autoWrite is enabled, the results are immediately uploaded.
-
fill
Unit fill(Color color)
Fill the entire device with this color. If autoWrite is enabled, the results are immediately uploaded. The current brightness level is also applied.
-
plus
Unit plus(WS2811.PixelColor color)
Fill the entire device with this color. If autoWrite is enabled, the results are immediately uploaded.
-
plus
Unit plus(Color color)
Fill the entire device with this color. If autoWrite is enabled, the results are immediately uploaded. The current brightness level is also applied.
-
set
abstract Unit set(Integer index, WS2811.PixelColor color)
Set an individual pixel (this is available as an indexed value). If autoWrite is enabled, the results are immediately uploaded.
-
set
Unit set(Integer index, Color color)
Set an individual pixel (this is available as an indexed value). If autoWrite is enabled, the results are immediately uploaded.The current brightness level is also applied.
-
set
abstract Unit set(Integer start, Integer end, WS2811.PixelColor color)
Set a range of pixels to a color. If autoWrite is enabled, the results are immediately uploaded.
-
set
Unit set(Integer start, Integer end, Color color)
Set a range of pixels to a color. If autoWrite is enabled, the results are immediately uploaded. The current brightness level is also applied.
-
set
abstract Unit set(Integer start, Integer end, List<WS2811.PixelColor> colors)
Set a range of pixels to a range of colors. The color list must be equal to or larger than the range specified. If autoWrite is enabled, the results are * immediately uploaded.
-
getAutoWrite
abstract Boolean getAutoWrite()
-
setAutoWrite
abstract Unit setAutoWrite(Boolean autoWrite)
-
getBrightness
abstract Float getBrightness()
-
setBrightness
abstract Unit setBrightness(Float brightness)
-
-
-
-