NAME
Device::BlinkStick
SYNOPSIS
use 5.10.0 ;
use strict ;
use warnings ;
use Device::BlinkStick;
my $object = Device::BlinkStick->new() ;
DESCRIPTION
See Also
left to do from python version
def _usb_get_string(self, device, length, index):
def get_led_data(self):
def data_to_message(self, data):
def set_random_color(self):
def turn_off(self):
def pulse(self, red=0, green=0, blue=0, name=None, hex=None, repeats=1, duration=1000, steps=50):
def blink(self, red=0, green=0, blue=0, name=None, hex=None, repeats=1, delay=500):
def morph(self, red=0, green=0, blue=0, name=None, hex=None, duration=1000, steps=50):
def open_device(self, d):
- new
-
Create an instance of a blink stick, will either connect a stick with a given serial_number, device_name or just the first one thats found
- verbose
-
output some debug as things happen
- serial_number
-
optionally find this stick
- device_name
-
optionally find this stick, if serial_number is also defined that will over-ride I am working on the premise that the device name is stored in info_block_1
- info
-
get a hash of info about the device
- get_manufacturer
-
retrieve the manufacturer name
- get_description
-
retrieve the device description
- get_serial
-
retrieve the device serial number
- get_info_block1
-
get the contents of info_block_1, maybe the device name?
- get_info_block2
-
get the contents of get_info_block_2, maybe the acccess token for the online service?
- set_info_block1
-
- str
-
string to write into info_block_1, the device name?
This will get trimmed to 32 characters
returns true/false depending if the string was set
- set_info_block2
-
- str
-
string to write into info_block_2, the online access token?
This will get trimmed to 32 characters
returns true/false depending if the string was set
- get_mode
-
returns the display mode
0 normal 1 inverse 2 WS2812
- set_mode
-
Set the display mode
- mode
-
mode to set
0 normal 1 inverse 2 WS2812
returns true/false depending if the mode was set
- get_color
-
returns the color as rgb
- set_color
-
set the rgb color for a single pixel blinkstick
- r
-
red part 0..255
- g
-
green part 0..255
- b
-
blue part 0..255
returns true/false depending if the mode was set
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 479:
'=item' outside of any '=over'
=over without closing =back