Code Monkey home page Code Monkey logo

blinkstick-python's Introduction

BlinkStick Python

BlinkStick Python interface to control devices connected to the computer.

What is BlinkStick? It's a smart USB LED pixel. More info about it here:

http://www.blinkstick.com

Resources

Requirements

  • Python
  • BlinkStick pip module
  • Libusb for Mac OSX

Requirements Installation

Linux

Install pip (Python package management software):

sudo apt-get install python-pip

Mac OS X

Install libusb with homebrew:

brew install libusb

Install pip

sudo easy_install pip

Known Errors

ValueError: No backend available

This means that the Python usb module cannot find your installation of libusb. It seems to be an issue when you have homebrew installed somewhere that is not expected.

It can be mitigated with

sudo ln -s `brew --prefix`/lib/libusb-* /usr/local/lib/

Microsoft Windows

  • Download and install Python 2.7.9 or any 2.x later version
  • During the installation, make sure you select "Add python.exe to Path" to install on local hard drive

Python 2.7.9 and later already comes with pip making it very easy to install BlinkStick Python package on Windows.

BlinkStick package Installation

Linux and Mac OS X

Install blinkstick Python package with pip:

sudo pip install blinkstick

Microsoft Windows

Open commandline environment by using Win+R keyboard shortcut and typing in:

cmd

Assuming that Python was installed into C:\Python27 folder, type in the following into the command window:

C:\Python27\Scripts\pip.exe install blinkstick

Command line tool

Together with the Python module an additional command line tool is installed to control BlinkSticks.

blinkstick --pulse red

You can find more details about command line tool options and usage examples in the wiki.

Permission problems in Linux and Mac OS X

If the script returns with an error

Access denied (insufficient permissions)

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

sudo blinkstick --set-color random 

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

sudo blinkstick --add-udev-rule

There is also another equivalent command that does exactly the same thing:

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.

Maintainers

blinkstick-python's People

Contributors

arvydas avatar brendanmaguire avatar np avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.