Project

blinkstick

0.01
No commit activity in last 3 years
No release in over 3 years
BlinkStick provides a ruby interface to an Agile Innovative BlinkStick via libusb.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 1.4.2
>= 0.4.0
 Project Readme

BlinkStick Ruby

BlinkStick Ruby interface to control devices connected to the computer.

What is BlinkStick? Check it out here:

http://www.blinkstick.com

Requirements

  • Ruby 1.9.3
  • LibUSB development libraries
  • Color and LibUSB gems
[sudo] gem install color
[sudo] gem install libusb

Note: Please refer to larskanis/libusb documentation on how to install the gem on various platforms.

Description

Description of files:

  • blinkstick.rb - main BlinkStick class definition
  • example-info.rb - displays information of each BlinkStick
  • example-infoblock.rb - read/write info block sample
  • example-off.rb - turn all blinksticks off
  • example-random.rb - set random color to all blinksticks

Running examples:

ruby example-info.rb

Permission problems

If the script returns with an error

LIBUSB::ERROR_ACCESS in libusb_open

You can either run the script with sudo, for example:

sudo ruby example-info.rb

Or you can add a udev rule to allow any user to access the device without root permissions with this single command:

echo "SUBSYSTEM==\"usb\", ATTR{idVendor}==\"20a0\", ATTR{idProduct}==\"41e5\", MODE:=\"0666\"" | sudo tee /etc/udev/rules.d/85-blinkstick.rules

Reboot computer after you have added the command and all users will have permissions to access the device without the need of root permissions.