GPIO for Button Shim and Witty Pi 2

Hi all, I’m having trouble with getting my Button Shim and Witty PI 2 to work together,

I was after a bit of simple advice of how I can use both of them together.

The witty pi uses 4 GPIO pins, (2,3,4,17)

and the button shim uses GPIO (2,3)

I can change GPIO pins used by the Witty pi pins (4,17), but not sure what to do with GPIO pins 2,3

As well as, does it matter which pins use the 5v and 3v3 power?

Appreciate your advice on this,

Cheers,

Kit

Pins 2 and 3 are i2c. Thats a shared bus that can be used by multiple devices, as long as no two devices have the same i2c address. The button shim uses 0x3f and the Witty Pi uses ox68 so thats not a problem.
Pins 2 and 4 are physically tied together so it doesn’t matter which one you use. They both have the same +5V source. Multiple devices can be connected to the +5V, +3.3V and Ground pins. As long as you don’t draw too much current, 1.2 A is I believe the limit set by the poly fuse.

Hi Kerry,

Thank you for the quick response, I stacked the Button Shim on top of the Witty Pi, and found the the Button Shim python script (rainbow) errored.

Is this because of the conflict with GPIO pins 4/17, which are used by the Witty Pi?

Don’t confuse the physical pin numbers with the BCM numbers.
BCM 17 is physical pin 11. Pin 11 isn’t used by the Button shim.
BCM 4 is physical pin 7. Pin 7 also isn’t used by the Button Shim.
Any of the +5V, +3.3V or Ground pins being shared isn’t an issue
I don’t see any conflicts, Pin wise.

Why you got error’s with the python code, I don’t know?

Hmm, yes, it’s very strange, but appreciate you’re help with this,

Did you try any of the other button shim examples?
And if you can remeber it, what was the error message?

I’ll try it out tonight and will share it, I think I did get the same issue with another example.

Ok, great, it might tip us off to what’s going wrong.

Thank you, managed to get it to work :)

Thats nice to hear. Enjoy your Pi tech. ;)