I was wondering if there was any harm in using a hyperpixel screen with a gpio extender/triplicator so I could also link other hardware like buttons and encoders to the same Pi?
Could there be a power consumption issue or conflict in data? I really want to use these touchscreens for a project, however need the other hardware to make it work.
Hyperpixel uses pretty much all of the GPIO pins, and dup/triplicators don’t actually create new pins, they just give you an extra way to connect to them. The one option you’d have is using the alternate I2C bus (see the section at the bottom) with an I2C GPIO expander like the Pimoroni Breakout Garden Expander or Adafruit’s Expander Bonnet.
If you’re just using a couple of LEDs, buttons and rotary encoders it shouldn’t be much of a problem power-wise. If you were going to use a lot of LEDs, particularly RGB LEDs, or motors, then you’d need to think it out a bit.
Thanks for all this! Yeh I wasn’t fully sure how the duplicators handled data. But having the two buses would be perfect. In regards to coding is it quite easy to switch between buses? I’d probably be writing a simple python script to handle the data and osc out to my main software.
The hardware is just those rotatry encoders and buttons (w/ leds) so yeh I think power would be okay. Just thought I’d check as I’m quite new to integrating hardware on a Pi!
Yeh I wasn’t fully sure how the duplicators handled data
It’s a pretty common misconception, but unfortunately adding more pins to the Pi isn’t that simple.
In regards to coding is it quite easy to switch between buses?
You don’t really need to switch between anything, there’s one line of code or so described in the guide I linked above to tell the Pi to treat the alternative I2C bus as the normal bus, and everything should work as normal from there. The one thing you might need to check is how the interrupt pin works, if you have one of the Hyperpixels with the 5-pin connector on the bottom (as in the store product page) then you should be able to use the interrupt function so that the expander will ping the Pi any time something changes instead of having to get the Pi to constantly check the buttons. It looks like the Pimoroni Expander breakout already has an example for a rotary encoder with interrupt capabilities, but I’m not sure which physical pin on the Pi this uses for the interrupt.