|
void | setDevice (UsbDevice device) |
|
UsbDevice | getDevice () |
|
void | setConnection (UsbDeviceConnection con) |
|
int | getVersionMajor () |
|
int | getVersionMinor () |
|
BlinkStickDeviceEnum | getBlinkStickDevice () |
|
void | setBrightnessLimit (int value) |
|
int | getBrightnessLimit () |
|
boolean | isConnected () |
|
void | setColor (int r, int g, int b) |
|
void | setColor (byte r, byte g, byte b) |
|
void | setIndexedColor (int channel, int index, int r, int g, int b) |
|
void | setIndexedColor (byte channel, byte index, byte r, byte g, byte b) |
|
void | setIndexedColor (int channel, int index, int value) |
|
void | setIndexedColor (int index, int value) |
|
void | setColor (int value) |
|
void | setColor (String value) |
|
void | setRandomColor () |
|
void | turnOff () |
|
int | getColor () |
|
String | getColorString () |
|
String | getInfoBlock1 () |
|
String | getInfoBlock2 () |
|
void | setInfoBlock1 (String value) |
|
void | setInfoBlock2 (String value) |
|
String | getManufacturer () |
|
String | getProduct () |
|
String | getSerial () |
|
void | setColors (byte[] colorData) |
|
void | setColors (int channel, byte[] colorData) |
|
void | setColors (byte channel, byte[] colorData) |
|
void | setMode (int mode) |
|
void | setMode (byte mode) |
|
byte | getMode () |
|
|
static final int | STD_USB_REQUEST_GET_DESCRIPTOR = 0x06 |
|
static final int | LIBUSB_DT_STRING = 0x03 |
|
Class designed to communicate with BlinkStick devices.
int com.agileinnovative.blinkstick.BlinkStick.getBrightnessLimit |
( |
| ) |
|
Get the current brightness limit
- Returns
- the maximum amount of brightness for LEDs in the range of [0..255]
int com.agileinnovative.blinkstick.BlinkStick.getColor |
( |
| ) |
|
Get the current color of the device as int
- Returns
- The current color of the device as int
String com.agileinnovative.blinkstick.BlinkStick.getColorString |
( |
| ) |
|
Get the current color of the device in #rrggbb format
- Returns
- Returns the current color of the device as #rrggbb formated string
UsbDevice com.agileinnovative.blinkstick.BlinkStick.getDevice |
( |
| ) |
|
Get UsbDevice
- Returns
- USB device reference
String com.agileinnovative.blinkstick.BlinkStick.getInfoBlock1 |
( |
| ) |
|
Get value of InfoBlock1
- Returns
- The value of info block 1
String com.agileinnovative.blinkstick.BlinkStick.getInfoBlock2 |
( |
| ) |
|
Get value of InfoBlock2
- Returns
- The value of info block 2
String com.agileinnovative.blinkstick.BlinkStick.getManufacturer |
( |
| ) |
|
Get the manufacturer of the device
- Returns
- Returns the manufacturer name of the device
byte com.agileinnovative.blinkstick.BlinkStick.getMode |
( |
| ) |
|
Get the mode of BlinkStick Pro
- Returns
- 0 - Normal, 1 - Inverse, 2 - WS2812, 3 - WS2812 mirror
String com.agileinnovative.blinkstick.BlinkStick.getProduct |
( |
| ) |
|
Get the product description of the device
- Returns
- Returns the product name of the device.
String com.agileinnovative.blinkstick.BlinkStick.getSerial |
( |
| ) |
|
Get the serial number of the device
- Returns
- Returns the serial number of device.
int com.agileinnovative.blinkstick.BlinkStick.getVersionMajor |
( |
| ) |
|
Get major version number from serial
- Returns
- Major version number as int
int com.agileinnovative.blinkstick.BlinkStick.getVersionMinor |
( |
| ) |
|
Get minor version number from serial
- Returns
- Minor version number as int
boolean com.agileinnovative.blinkstick.BlinkStick.isConnected |
( |
| ) |
|
void com.agileinnovative.blinkstick.BlinkStick.setBrightnessLimit |
( |
int |
value | ) |
|
Set the brightness limit
- Parameters
-
value | the maximum amount of brightness for LEDs in the range of [0..255] |
void com.agileinnovative.blinkstick.BlinkStick.setColor |
( |
int |
r, |
|
|
int |
g, |
|
|
int |
b |
|
) |
| |
Set the color of the device with separate r, g and b int values. The values are automatically converted to byte values
- Parameters
-
r | red int color value 0..255 |
g | gree int color value 0..255 |
b | blue int color value 0..255 |
void com.agileinnovative.blinkstick.BlinkStick.setColor |
( |
byte |
r, |
|
|
byte |
g, |
|
|
byte |
b |
|
) |
| |
Set the color of the device with separate r, g and b byte values
- Parameters
-
r | red byte color value 0..255 |
g | gree byte color value 0..255 |
b | blue byte color value 0..255 |
void com.agileinnovative.blinkstick.BlinkStick.setColor |
( |
int |
value | ) |
|
Set the color of the device with Processing color value
- Parameters
-
void com.agileinnovative.blinkstick.BlinkStick.setColor |
( |
String |
value | ) |
|
Set the color of the device with string value
- Parameters
-
value | this can either be a named color "red", "green", "blue" and etc. or a hex color in #rrggbb format |
void com.agileinnovative.blinkstick.BlinkStick.setColors |
( |
byte[] |
colorData | ) |
|
Send a packet of data to LEDs on channel 0 (R)
- Parameters
-
colorData | Report data must be a byte array in the following format: [g0, r0, b0, g1, r1, b1, g2, r2, b2 ...] |
void com.agileinnovative.blinkstick.BlinkStick.setColors |
( |
int |
channel, |
|
|
byte[] |
colorData |
|
) |
| |
Send a packet of data to LEDs
- Parameters
-
channel | Channel (0 - R, 1 - G, 2 - B) |
colorData | Report data must be a byte array in the following format: [g0, r0, b0, g1, r1, b1, g2, r2, b2 ...] |
void com.agileinnovative.blinkstick.BlinkStick.setColors |
( |
byte |
channel, |
|
|
byte[] |
colorData |
|
) |
| |
Send a packet of data to LEDs
- Parameters
-
channel | Channel (0 - R, 1 - G, 2 - B) |
colorData | Report data must be a byte array in the following format: [g0, r0, b0, g1, r1, b1, g2, r2, b2 ...] |
void com.agileinnovative.blinkstick.BlinkStick.setConnection |
( |
UsbDeviceConnection |
con | ) |
|
Assign USB device connection
- Parameters
-
con | Connection object to communicate with BlinkStick device |
void com.agileinnovative.blinkstick.BlinkStick.setDevice |
( |
UsbDevice |
device | ) |
|
Assign UsbDevice
- Parameters
-
device | object to communicate directly with BlinkStick |
void com.agileinnovative.blinkstick.BlinkStick.setIndexedColor |
( |
int |
channel, |
|
|
int |
index, |
|
|
int |
r, |
|
|
int |
g, |
|
|
int |
b |
|
) |
| |
Set indexed color of the device with separate r, g and b byte values for channel and LED index
- Parameters
-
channel | Channel (0 - R, 1 - G, 2 - B) |
index | Index of the LED |
r | red int color value 0..255 |
g | gree int color value 0..255 |
b | blue int color value 0..255 |
void com.agileinnovative.blinkstick.BlinkStick.setIndexedColor |
( |
byte |
channel, |
|
|
byte |
index, |
|
|
byte |
r, |
|
|
byte |
g, |
|
|
byte |
b |
|
) |
| |
Set indexed color of the device with separate r, g and b byte values for channel and LED index
- Parameters
-
channel | Channel (0 - R, 1 - G, 2 - B) |
index | Index of the LED |
r | red byte color value 0..255 |
g | gree byte color value 0..255 |
b | blue byte color value 0..255 |
void com.agileinnovative.blinkstick.BlinkStick.setIndexedColor |
( |
int |
channel, |
|
|
int |
index, |
|
|
int |
value |
|
) |
| |
Set the indexed color of BlinkStick Pro with Processing color value
- Parameters
-
channel | Channel (0 - R, 1 - G, 2 - B) |
index | Index of the LED |
value | color as int |
void com.agileinnovative.blinkstick.BlinkStick.setIndexedColor |
( |
int |
index, |
|
|
int |
value |
|
) |
| |
Set the indexed color of BlinkStick Pro with Processing color value for channel 0
- Parameters
-
index | Index of the LED |
value | color as int |
void com.agileinnovative.blinkstick.BlinkStick.setInfoBlock1 |
( |
String |
value | ) |
|
Set value for InfoBlock1
- Parameters
-
value | The value to be written to the info block 1 |
void com.agileinnovative.blinkstick.BlinkStick.setInfoBlock2 |
( |
String |
value | ) |
|
Set value for InfoBlock2
- Parameters
-
value | The value to be written to the info block 2 |
void com.agileinnovative.blinkstick.BlinkStick.setMode |
( |
int |
mode | ) |
|
Set the mode of BlinkStick Pro as int
- Parameters
-
mode | 0 - Normal, 1 - Inverse, 2 - WS2812, 3 - WS2812 mirror |
void com.agileinnovative.blinkstick.BlinkStick.setMode |
( |
byte |
mode | ) |
|
Set the mode of BlinkStick Pro as byte
- Parameters
-
mode | 0 - Normal, 1 - Inverse, 2 - WS2812, 3 - WS2812 mirror |
void com.agileinnovative.blinkstick.BlinkStick.setRandomColor |
( |
| ) |
|
void com.agileinnovative.blinkstick.BlinkStick.turnOff |
( |
| ) |
|
The documentation for this class was generated from the following file:
- src/com/agileinnovative/blinkstick/BlinkStick.java