HyperPixel adding physical Button

I looked at https://pinout.xyz/pinout/hyperpixel Does this mean if I use the Hyperpixel, I can’t even add a button anymore?

If you’re button is using one of the GPIO pins, then as far as I understand it, no I’m afraid you can’t add one.

I’m still unsure as to how hats like the Black Hat H3cker work, so if anyone else here who understands it a little more than I do can shed some light that’d be great. :)

If you’re sufficiently versed in electronics, you can add them via an i2c IO expander connected to pins BCM10 and BCM11. Actually you should be able to take any HAT/pHAT that uses the i2c bus and- as long as it doesn’t conflict with the Touch i2c address- re-route its i2c bus to those two pins.

Thanks for the Info. I don’t think I am well versed for that. At least I havent used i2c on my own just in some heads I was using. Maybe this could be added to the github repo in the future. :) Thanks for the quick replies!!!

It’s something I’m considering experimenting with, to see if it can be documented better. It seems to be a common question!

It’s a lot easier than I make it sound. Apart from plugging the right wires into the right place, it involves a little software tweaking to re-route the i2c bus. Although I suspect it might be possible to soft-link it, to trick existing libraries into just working.

1 Like

hey @gadgetoid I just discovered the Button Shim https://shop.pimoroni.com/products/button-shim Can you use the HyperPixel display and the Buttom Shim. Can you use them together?

Yes and no. You can’t just hook it up and have it work out of the box, but I’m reasonably sure it’s possible to wire it to the i2c bus used by HyperPixel (BCM 10 and 11 for Data/Clock) and tweak the library accordingly.

Some… creative modifications… to Button SHIM itself might make this possible to do cleanly. It would be delicate, though, since you’d have to cut the traces between the IO chip and the holes for GPIO, then run copper enamel wire from the Data/Clock pins to BCM10/11.