Site Map - skip to main content - dyslexic font - mobile - text - print

Hacker Public Radio

Your ideas, projects, opinions - podcasted.

New episodes Monday through Friday.


From Wed 20th December 2017 all the media from the HPR feeds will be served via a redirect towards Archive.org. Please notify admin@HPR of any issues.

Our hosting is kindly provided by Josh from AnHonestHost.com. We would appreciate it if you could donate to help reduce his costs in funding the hosting.
He is also accepting bitcoins to 1KsxJr9HtsdaUeU7yaV9bk9bQi21UPBtUq

hpr2089 :: Solving a blinkstick python problem

How I solved a problem I found when trying to control my new blinkstick nano with Python

<< First, < Previous, Latest >>

Hosted by MrX on 2016-08-04 is flagged as Clean and is released under a CC-BY-SA license.
Listen in ogg, spx, or mp3 format. | Comments (1)

This is a show describing how I solved a problem of using my new Blinkstick Nano in Python, the problem occurred because I inadvertently installed the blinkstick module to the wrong version of Python as I have multiple versions of python installed on my raspberry pi.

A blinkstick is a USB powered device with attached RGB led’s, it can be controlled using a wide range of languages, and supports the Raspberry Pi, Linux, Microsoft Windows & Apple

As a side note I forgot to mention that the blinkstick hardware and software is Open Source

Initially I blindly followed the advice given at https://www.blinkstick.com/help/raspberry-pi-integration which recommended the following commands

sudo apt-get install -y python-pip python2.7-dev
sudo pip install blinkstick
sudo blinkstick --info
blnkstick --add-udev-rule

I discovered that the blinkstick module was not being found when I ran my python script, this turned out to be because I was invoking a different version of python in my script from that which I installed the blinkstick module. I installed the blinkstick module to Python 2.7, my script was running python 3.2

I ran the following commands to rectify the problem

sudo apt-get install -y python3-pip
sudo pip-3.2 install blinkstick
sudo blinkstick --info (Run in my script)
blinkstick --add-udev-rule (Not required 2nd time round)

Here are some links I looked at to get some understanding of what was going on

You can get a list of your installed python modules by first going to the python interpreter by typing python at the command prompt and issuing the following command

>>> help('modules')

You can list your python search path by first going to the interpreter by typing python at the command prompt and issuing the following commands, the search path is the list of system directories that python will search to run things like commands and modules

>>> import sys
>>> sys.path

Comments

Subscribe to the comments RSS feed.

Comment #1 posted on 2016-08-13T10:24:35Z by Dave Morriss

Great show

Hi Mr X,

An interesting show. Good to know you're having fun with the BlinkStick.

I'm looking forward to hearing about your Python project in due course.

Leave Comment

Note to Verbose Commenters
If you can't fit everything you want to say in the comment below then you really should record a response show instead.

Note to Spammers
All comments are moderated. All links are checked by humans. We strip out all html. Feel free to
record a show about yourself, or your industry, or any other topic we may find interesting. We also check shows for spam :).

Provide feedback
Your Name/Handle:
Title:
Comment:
Anti Spam Question: What does the P in HPR stand for ?
Are you a spammer →
Who hosted this show →
What does HPR mean to you ?