public abstract static class NeoPixel.Callbacks extends java.lang.Object implements MetaWearController.ModuleCallbacks
Constructor and Description |
---|
NeoPixel.Callbacks() |
Modifier and Type | Method and Description |
---|---|
Module |
getModule()
Get the module the notification represents
|
void |
receivedHoldState(byte strandIndex,
byte state)
Called when the strand's hold state has been read
|
void |
receivedPixelColor(byte strandIndex,
byte pixel,
byte red,
byte green,
byte blue)
Called when a pixel color has been read
|
void |
receivedRotatationState(byte strandIndex,
NeoPixel.RotationDirection direction,
byte repetitions,
short period)
Called when the rotate state of a strand has been read
|
void |
receivedStrandState(byte strandIndex,
NeoPixel.ColorOrdering order,
NeoPixel.StrandSpeed speed,
byte pin,
byte strandLength)
Called when the strand state has been read
|
public final Module getModule()
MetaWearController.ModuleCallbacks
getModule
in interface MetaWearController.ModuleCallbacks
Module
public void receivedStrandState(byte strandIndex, NeoPixel.ColorOrdering order, NeoPixel.StrandSpeed speed, byte pin, byte strandLength)
strandIndex
- Strand index readorder
- Color ordering of the specific strandspeed
- Interface speed of the strandpin
- GPIO pin on the MetaWear board the NeoPixel strand is connected tostrandLength
- Number of pixels on the strandpublic void receivedHoldState(byte strandIndex, byte state)
strandIndex
- Strand index readstate
- 0 if disabled, 1 if enabledpublic void receivedPixelColor(byte strandIndex, byte pixel, byte red, byte green, byte blue)
strandIndex
- Strand index the pixel resides onpixel
- Index of the pixelred
- Red color valuegreen
- Green color valueblue
- Blue color valuepublic void receivedRotatationState(byte strandIndex, NeoPixel.RotationDirection direction, byte repetitions, short period)
strandIndex
- Strand index readdirection
- Rotation direction i.e. away from or towards the boardrepetitions
- Number of times the rotation will occur, -1 if rotation is happening indefinitelyperiod
- Delay between rotations in milliseconds