ProtectedabortReadonlydeviceReadonlydeviceProtecteddeviceProtectedisReadonlyisLED count of the device, based on known device descriptions.
ReadonlymanufacturerManufacturer of the device (always 'Agile Innovative Ltd')
ReadonlyproductProduct name of the device (e.g., 'BlinkStick Nano'). MAY be wrong (eg. BlinkStick Square identifies as "BlinkStick")
ReadonlyrequiresReadonlyserialSerial number of the device. Format: BSnnnnnn-x.y
ReadonlyversionVersion, small integer representing major version (x in BSnnnnnn-x.y)
ReadonlyversionVersion, small integer representing minor version (y in BSnnnnnn-x.y)
Gets 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.
Get ID of this specific device. It's stored in infoBlock2, so using this property is incompatible with using infoBlock2 for other purposes.
This allows BlinkStick instances to be used with explicit resource management
Get the current color visible on BlinkStick
The index of the LED, 0 is default
ProtectedgetGet 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 33 byte Buffer 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. First byte is report ID, the rest is data.
Get the infoblock2 of the device. This is a 33 byte array that can contain any data. First byte is report ID, the rest is data. Using it is INCOMPATIBLE with DeviceIdManager.
ExperimentalGets the number of LEDs from the device.
Gets the current mode.
Gets API to control all LEDs on the device.
ExperimentalLoads 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
ProtectedsendProtectedsetA workaround for setting colors on Flex on Linux.
Set the color frame on BlinkStick Pro Missing colors are filled with zeros. Note - this method seemingly has DIFFERENT behavior on different devices.
Channel is represented as 0=R, 1=G, 2=B
LED data in the following format: [g0, r0, b0, g1, r1, b1...]
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
Sets the infoblock2 with specified Buffer of length of 33. The first byte of the buffer is report ID, the rest is data.
ExperimentalSets 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
ProtectedwriteThis method is used to write debug commands to the debug stream.
It should never be called if commandDebug is not set.
Changes the default retry count for sending feature reports.