New Python library for blink(1) & blink(1) mk2

Salim Fadhley has taken on the job of rewriting the basic Python blink(1) library we provided and making it so much more awesome. You can get it here: https://pypi.python.org/pypi/blink1

As he says: “This is a rewrite of ThingM’s original Python library. It includes the following modifications:

100% test coverage on all library components

Python 3.x compatible

Automatic installation via Python Package Index.

Higher level control over the blink(1).

Single implementation with pyusb, intended to be installed with admin access or virtualenv.”

He’s also added features like gamma correction and white-point correction. Salim has been pushing his changes to the official ThingM blink1 github and we’re very proud to have it as part of the official blink(1) software set.

Is there any manual how we can download and start this package so that it is running out of the box? There seems to be so many things missing: Which python version (2.7?, 2.6?, 3?), where to install the test-files, how to run the example etc pp.

Thanks for the immediate reply. There seems to be many python-versions and, at least for me, it is not entirely clear what to use. Maybe this has to do with the USB problem. So I understand it correctly that this is a trial-and-error approach?

I gained a little ground by using now the correct version because I get and USB-error message (File “/Library/Python/2.7/site-packages/blink1/blink1.py”, line 90, in find
dev = usb.core.find(idVendor=VENDOR_ID, idProduct=PRODUCT_ID)
File “build/bdist.macosx-10.9-intel/egg/usb/core.py”, line 864, in find
ValueError: No backend available). I will look further.

Yes, it’s been trial-and-error for me. I’m not much of a Python expert though. The default “pypi” library should work for both Python 2.7+ and Python 3.x, but I think it might actually need Python 3.x. (or at least I’ve not been able to get it to work under 2.7+)

That “no backend available” message is because there’s no libusb driver for Python. I’ve had a lot of similar problems on my Mac too. It doesn’t help that the Mac comes with a Python (and needs it for the system), but when you use “pip” that could be using your own install of Python (if using homebrew or macports)

On my to-do list is to level-up in my Python abilities (I wrote the library in “alternative_libraries”) enough to fold some of the ease-of-use ideas I’ve seen in other Python libraries into this library and take over its development from Salim.

blink(1), the USB RGB LED

blink(1) is a super status light. It fits into any USB port on almost every type of computer: Mac, Linux, Windows, Raspberry Pi, Beaglebone, WRT router, etc. No drivers needed and APIs in about every language you could want. And it's all open source.
Buy one now!