Piglow on Raspberry Pi 2 help

I have just purchased a PiGlow. Before I open the package I just want to know if it works with the Pi 2. If it does work, which pins on the Pi GPIO connector does it go on?

Mick

Yes it does work. You need to locate it on the header so that the PiGlow is over the Pi, and it’s on the pins furthest away from the 4 USB ports.

Here’s a super useful image that I nicked from, of all places, an Ali Express shop!

Many thanks for this. PiGlow is now up and running. I am using the PyGlow libraries to access the device from Python 2.7. However I am getting random ‘IOError [Errno 5]’ errors during script execution. Rerunning a script will cause it to fall over at a different point. Here is the script:-

from PyGlow import PyGlow
import time
pyglow = PyGlow()
while True:
pyglow.all(0)
for j in range(10,250,10):
for i in range(1,19):
print i,j
pyglow.led(i,j)
time.sleep(0.1)

Is this a known problem or maybe a problem with the library.

Mick

Have you tried our library? It’s available here, with instructions for getting it installed: https://github.com/pimoroni/piglow

You’re not the first person to encounter such errors with another library- it’d be interesting to see if ours solves your problem too!

Still the same problem. Some simple repeating Python scripts don’t have this problem.

However, lighting the LEDs in sequence from 1 to 18 doesn’t make them light in physical sequence. Some parts are in sequence but then it hops to another arm or does 3 LEDs in reverse sequence on one arm.

Is this to be expected?

Someone else pointed this out. Our version of the library doesn’t make any effort to re-order the LEDs in any particular sequence and their placement on the board is necessitated by ease of routing rather than logic. One of those “do this in hardware, then fix it in software” moments.

Are you able to exacerbate the IOErrors by touching/moving the PiGlow when it’s running?