- ABOUT BLINKYTAPE
- USING THE MODULE ON OS X WITHOUT OWNING A BLINKYTAPE
- REFERENCE READING
- COPYRIGHT AND LICENSE
Device::BlinkyTape - Control a BlinkyTape led strip
use Device::BlinkyTape::WS2811; # BlinkyTape uses WS2811 my $bb = Device::BlinkyTape::WS2811->new(dev => '/dev/tty.usbmodem'); # Set all led pixels on full white $bb->all_on(); # Set all led pixels off $bb->all_off(); # Send a white pixel (RGB 255/255/255). # Pixels are sent one by one from left to right. $bb->send_pixel(255,255,255); $bb->send_pixel(5,5,5); # Show all sent pixels and reset send_pixel to the first pixel. $bb->show();
The device where your usb ledstrip is at. Defaults to /dev/tty.usbmodem.
Instead of giving the device you can create the instance of this module by directly giving it a Device:SerialPort object. By default the Device::SerialPort object is created from the device given in the 'dev' parameter.
Specify the gamma correction. Defaults to [1,1,1]
Specify the led count, counting from 1. The default is 60.
Specify if the module should simulate a BlinkyTape onscreen instead of using one in the usb port. Defaults to 0 (false). If this is true then the port and dev parameters have no effect.
Sending data too fast freezes the BlinkyTape. Sleeping for 30 microseconds between each byte makes sure the atmega processor of the BlinkyTape can keep up with the incoming data.
Turns all leds on.
Turns all leds off.
Send the RGB value for the next pixel. Values 0-254 are sent as is, value 255 is converted to 254.
Shows the sent pixels and resets the send_pixel to the first led pixel of the strip. This is done by sending a single 255 value byte to the led strip.
Blinkytape is a controllable led strip available at http://blinkiverse.com/blinkytape/
This module comes with a BlinkyTape simulator. Install X11 server to use the simulator: http://xquartz.macosforge.org/landing/
The device is not yet available so the module has been implemented by inspecting partly undocumented and unfinished code in other languages. Feel free to file any bug reports in Github, patches welcome.
Communicating with the Arduino in Perl http://playground.arduino.cc/interfacing/PERL
Perl communication to Arduino over serial USB http://www.windmeadow.com/node/38
Oskari Okko Ojala <email@example.com>
Based on exampls/Blinkyboard.py in Blinkiverse's BlinkyTape repository at https://github.com/blinkiverse/BlinkyTape/ by Max Henstell (mhenstell) and Marty McGuire (martymcguire).
Copyright (C) Oskari Okko Ojala 2013
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl you may have available.