# PiGlow on jumper wires - errors

**URL:** <https://forums.pimoroni.com/t/piglow-on-jumper-wires-errors/6540>\
**Category:** Support\
**Created:** [December 5, 2017, 10:25am UTC](https://forums.pimoroni.com/t/piglow-on-jumper-wires-errors/6540 "2017-12-05T10:25:56Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![EdTeach](https://avatars.discourse-cdn.com/v4/letter/e/d07c76/32.png) [@EdTeach](https://forums.pimoroni.com/u/EdTeach)\
**Post date:** [December 5, 2017, 10:25am UTC](https://forums.pimoroni.com/t/piglow-on-jumper-wires-errors/6540/1 "2017-12-05T10:25:57Z")

</div>

Being a cheapskate and not having a pHAT Stack, I noticed that [https://pinout.xyz/phatstack](https://pinout.xyz/phatstack) says that I should be able to run a PiGlow and Unicorn HAT from the same Raspberry Pi 2.

Unicorn HAT runs fine on standard m/f jumper (jerky) wires, but when I wire up PiGlow everything runs perfectly for a while before the code crashes with an ‘i/o error’. The amount of time the code (Python) runs for varies, but everything seems fine up to the point of the crash.

This occurs if only the PiGlow is present, connected by wires - it makes no difference whether or not Unicorn HAT is wired in too. When the PiGlow is seated on the Pi’s pins, the same code runs indefinitely.

Would there be a reason why wires affect things? As I say, it appears that all the connections are sound as the display works. I’ve rewired a couple of times, so I assume it’s not the wires’ fault.

All help gratefully received.

---

<div class="post-metadata">

**Author:** ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)\
**Post date:** [December 5, 2017, 1:55pm UTC](https://forums.pimoroni.com/t/piglow-on-jumper-wires-errors/6540/2 "2017-12-05T13:55:28Z")

</div>

Could you post a photo of the wiring?

Generally the communication protocol that PiGlow uses- SMBus/i2s- is designed for really short, very precise PCB-trace wiring. That doesn’t mean it wont work with jump wires, but it does mean there are a lot of factors- noise, crosstalk, bus capacitance, etc - that can make it a bit more of a challenge than a more direct connection.

So you could potentially be _right_ at the threshold of a functional signal for i2c, and periodically crossing that threshold into an IOError.

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [December 6, 2017, 9:53am UTC](https://forums.pimoroni.com/t/piglow-on-jumper-wires-errors/6540/3 "2017-12-06T09:53:51Z")

</div>

I’m currently running a couple of breakout boards that way. A MBP180 and an SI1145. They both use i2c. I have male headers on them, and male headers on my Proto Hat where the connection to i2c is made. I used female to female jumper wires. I just took the single shells off the ends and replaced them with 4 or 5 pin shells. It makes plugging and unplugging them easier. I don’t know if it matters but I keep all the jumpers the same length. No errors that I know off. This Pi is portable and headless. There is also a DS3231 and a Sense Hat on i2c. It’s doable.

It may be as @gadgetiod mentioned that that board is a bit fussy and sensitive to interference or something.

![DSCF0988](https://us1.discourse-cdn.com/flex016/uploads/pimoroni/original/2X/a/a46c2e790c0cd41f91728735f69797ec13972565.jpg)

---

<div class="post-metadata">

**Author:** ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)\
**Post date:** [December 8, 2017, 2:45pm UTC](https://forums.pimoroni.com/t/piglow-on-jumper-wires-errors/6540/4 "2017-12-08T14:45:29Z")

</div>

I’ve definitely had the odd jumper wire now and then that- for reasons I’ve never bothered looking into- simply doesn’t want to carry an i2c signal without turning it to mush.

But as a counter-example, I’ve had a lot more hastily bodged together i2c setups over jumper wires that have worked absolutely fine!

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [December 8, 2017, 8:18pm UTC](https://forums.pimoroni.com/t/piglow-on-jumper-wires-errors/6540/5 "2017-12-08T20:18:03Z")

</div>

Just lucky I guess? I honestly haven’t given it a whole lot of thought. I didn’t know it was an issue, or could be an issue? My cables are made from jumpers that came in a kit, so they were all the same length. Mine are mostly away from the PI itself, which could induce noise etc. Noise aka interference would be what I think would mess things up. Pickup from components on the Pi scrambling the signal/data.

---

<div class="post-metadata">

**Author:** ![EdTeach](https://avatars.discourse-cdn.com/v4/letter/e/d07c76/32.png) [@EdTeach](https://forums.pimoroni.com/u/EdTeach)\
**Post date:** [December 9, 2017, 12:19pm UTC](https://forums.pimoroni.com/t/piglow-on-jumper-wires-errors/6540/6 "2017-12-09T12:19:30Z")

</div>

Apologies that I’ve not been able to provide photos of the wiring as requested this week - busy time! Here goes:

 ![WP_20171209_12_07_04_Pro](https://us1.discourse-cdn.com/flex016/uploads/pimoroni/original/2X/a/a01f46a9786988325b22529a845b8e00713a6793.jpg) ![WP_20171209_12_07_49_Pro](https://us1.discourse-cdn.com/flex016/uploads/pimoroni/original/2X/c/c1120a09d4aaf9e68cf3de76cec39420be7a0b37.jpg)

The wiring was made in conjunction with [https://pinout.xyz/pinout/piglow](https://pinout.xyz/pinout/piglow) - and these are Pimoroni Jumper Jerky wires for what it’s worth (and changed for my first attempt). The code still runs fine for a minute or two then crashes with this message:  
IOError: [Errno 121] Remote I/O error

As stated before, PiGlow is stable when on the pins, so I’d assume the ‘on the threshold’ theory is good!

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [December 9, 2017, 1:07pm UTC](https://forums.pimoroni.com/t/piglow-on-jumper-wires-errors/6540/7 "2017-12-09T13:07:28Z")

</div>

I’m pretty well doing the same thing, mine are female to female, but that shouldn’t matter at all. One thing I did different is I separated all the wires, they aren’t still stuck to each other like a ribbon cable. .

---

<div class="post-metadata">

**Author:** ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)\
**Post date:** [December 12, 2017, 4:45pm UTC](https://forums.pimoroni.com/t/piglow-on-jumper-wires-errors/6540/8 "2017-12-12T16:45:54Z")

</div>

Could be worth trying to separate the yellow/green (clock/data) wires from each other, and from everything else. I quite often use a very similar if not identical setup to the one you picture, though, so it could be flaky/marginal jumper jerky.

It’s possible, also, to modify the piglow library to give it some tolerance for IO errors, but not simple.

---

<div class="post-metadata">

**Author:** ![EdTeach](https://avatars.discourse-cdn.com/v4/letter/e/d07c76/32.png) [@EdTeach](https://forums.pimoroni.com/u/EdTeach)\
**Post date:** [December 17, 2017, 3:49pm UTC](https://forums.pimoroni.com/t/piglow-on-jumper-wires-errors/6540/9 "2017-12-17T15:49:30Z")

</div>

I tried again, separating the clock/data. I can’t be sure, but doing this seemed to make the crash come later… but it always crashed. I swapped wires (again) and even removed the USB wi-fi in case that was an issue — regretfully, it wasn’t.

Thanks for your help on this. I may try in the future and order some Jumper Jerky Junior, to see if ~100mm wires are better than the ~200mm ones, but not for this festive season.

Thanks again for the ideas!

---

<div class="post-metadata">

**Author:** ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)\
**Post date:** [December 19, 2017, 9:54am UTC](https://forums.pimoroni.com/t/piglow-on-jumper-wires-errors/6540/10 "2017-12-19T09:54:21Z")

</div>

You could try catching and ignoring the IOError by making sure auto\_update is disabled and doing something like:

```auto
try:
    piglow.show()
except IOError:
    pass

```

---

<div class="post-metadata">

**Author:** ![EdTeach](https://avatars.discourse-cdn.com/v4/letter/e/d07c76/32.png) [@EdTeach](https://forums.pimoroni.com/u/EdTeach)\
**Post date:** [December 23, 2017, 5:17pm UTC](https://forums.pimoroni.com/t/piglow-on-jumper-wires-errors/6540/11 "2017-12-23T17:17:23Z")

</div>

Nailed it!

That works — thank you both (and thanks for the time spent on this)!

We now have a fully Flotilla/PiGlow/UnicornHAT tree running from the old Pi2, power supply allowing (it’s working so far)…

Wishing you a fine piratey Christmas. May much 'tache wax be in your stocking!

---

<div class="post-metadata">

**Author:** ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)\
**Post date:** [December 23, 2017, 6:44pm UTC](https://forums.pimoroni.com/t/piglow-on-jumper-wires-errors/6540/12 "2017-12-23T18:44:20Z")

</div>

You’re welcome! Happy hacking and happy Christmas!

---

<div class="post-metadata">

**Author:** ![Monkeymike78](https://avatars.discourse-cdn.com/v4/letter/m/fbc32d/32.png) [@Monkeymike78](https://forums.pimoroni.com/u/Monkeymike78)\
**Post date:** [June 24, 2018, 11:46am UTC](https://forums.pimoroni.com/t/piglow-on-jumper-wires-errors/6540/13 "2018-06-24T11:46:48Z")

</div>

Sorry to jump in late on this but having same problem here but don’t know where to put this in code, sorry bit of a noob but got this far! Thanks

---

<div class="post-metadata">

**Author:** ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)\
**Post date:** [June 24, 2018, 2:04pm UTC](https://forums.pimoroni.com/t/piglow-on-jumper-wires-errors/6540/14 "2018-06-24T14:04:04Z")

</div>

This replaces your existing call to `piglow.show()`

---

<div class="post-metadata">

**Author:** ![Monkeymike78](https://avatars.discourse-cdn.com/v4/letter/m/fbc32d/32.png) [@Monkeymike78](https://forums.pimoroni.com/u/Monkeymike78)\
**Post date:** [June 25, 2018, 3:28pm UTC](https://forums.pimoroni.com/t/piglow-on-jumper-wires-errors/6540/15 "2018-06-25T15:28:02Z")

</div>

sorry could you put that in a bit more lay mens terms! like i said bit of a noob and first time tinkering with scripts etc!

---

<div class="post-metadata">

**Author:** ![EdTeach](https://avatars.discourse-cdn.com/v4/letter/e/d07c76/32.png) [@EdTeach](https://forums.pimoroni.com/u/EdTeach)\
**Post date:** [June 26, 2018, 3:52pm UTC](https://forums.pimoroni.com/t/piglow-on-jumper-wires-errors/6540/16 "2018-06-26T15:52:55Z")

</div>

Wherever you’ve typed “piglow.show()” replace that with the text above, starting with the “try:” line and being careful with the indentation. “Try… Except” lets Python do something but not stop running if there’s a problem, which is what it does here. The error caused by the wires is an “IOError” - an input/output error and this code just means it’s caught (with the “except” statement) and ignored (“pass” - a handy keyword which does nothing but completes the Python syntax correctly).

---

<div class="post-metadata">

**Author:** ![Monkeymike78](https://avatars.discourse-cdn.com/v4/letter/m/fbc32d/32.png) [@Monkeymike78](https://forums.pimoroni.com/u/Monkeymike78)\
**Post date:** [June 27, 2018, 2:34pm UTC](https://forums.pimoroni.com/t/piglow-on-jumper-wires-errors/6540/17 "2018-06-27T14:34:46Z")

</div>

Got you! god i wonder how i get by in life! thanks!
