Protected
Optional
_animationProtected
_inverseProtected
abortProtected
commandProtected
debugChanges the default retry count for sending feature reports.
Readonly
deviceReadonly
deviceProtected
deviceProtected
isReadonly
isReadonly
manufacturerReadonly
productReadonly
requiresProtected
scheduledReadonly
serialReadonly
versionReadonly
versionGets animation runner for the device. If device has unknown number of LEDs, getter will return null. If device is in inverse mode, getter will return null.
This allows BlinkStick instances to be used with explicit resource management
Close BlinkStick device and stop all animations
Protected
getGet a feature report from the device, retrying if necessary.
Report ID to receive
Expected length of the report
Maximum number of retries
Gets a feature report from the device without retries.
Get the infoblock1 of the device. This is a 32 byte array that can contain any data. It's supposed to hold the "Name" of the device making it easier to identify rather than a serial number.
Get the infoblock2 of the device. This is a 32 byte array that can contain any data.
Experimental
Gets the number of LEDs from the device.
Gets the current mode.
Gets API to control all LEDs on the device.
Experimental
Loads the LED count from the device on "supported" devices.
Morphs to specified RGB color from current color.
Function supports the following overloads:
//Available overloads
morph(red, green, blue, [options], [callback]); // use [0..255] ranges for intensity
morph(color, [options], [callback]); // use '#rrggbb' format
morph(color_name, [options], [callback]); // use 'random', 'red', 'green', 'yellow' and other CSS supported names
Options can contain the following parameters for object:
- channel=0: Channel is represented as 0=R, 1=G, 2=B
- index=0: The index of the LED
- duration=1000: How long should the morph animation last in milliseconds
- steps=50: How many steps for color changes
Pulses specified RGB color.
Function supports the following overloads:
//Available overloads
pulse(red, green, blue, [options], [callback]); // use [0..255] ranges for intensity
pulse(color, [options], [callback]); // use '#rrggbb' format
pulse(color_name, [options], [callback]); // use 'random', 'red', 'green', 'yellow' and other CSS supported names
Options can contain the following parameters for object:
- channel=0: Channel is represented as 0=R, 1=G, 2=B
- index=0: The index of the LED
- duration=1000: How long should the pulse animation last in milliseconds (this time is actually doubled, keeping it in-line with legacy behavior)
- steps=50: How many steps for color changes
Schedules an operation to be executed later.
Protected
sendLow-level method that directly sends a feature report to the device.
Protected
setA workaround for setting colors on Flex on Linux.
Set a feature report to the device.
First byte is report ID, the rest is data
Set a feature report to the device, and returns read data from the device.
Report ID to receive
Data to send to the device
Maximum number of retries
Experimental
Sets the number of LEDs on "supported" devices. Note that unplugging and plugging the device may be necessary for the change to take effect.
Set mode for BlinkStick Pro. This will persist across reboots.
You can read more about BlinkStick modes by following this link:
http://www.blinkstick.com/help/tutorials/blinkstick-pro-modes
Set a random color on BlinkStick.
The index of the LED, 0 is default
Stop all animations
Protected
writeThis method is used to write debug commands to the debug stream.
It should never be called if commandDebug
is not set.
Synchronous version of BlinkStick class.