i have following Problem: I have A raspberry Pi 3B+ with a Touchscreen, which uses every Single Pin on the 40Pin GPIO header. The only thing i have is a i2c breakout on my Touchscreen. But i have the problem, that i want to control Adressable RGB strips(ws2812) over this Touchscreen and these Strips are only able to get Data directly over one of the direct GPIO on the 40Pin GPIO header. The Pinout for my Touchscreen is here: pinout.xyz/pinout/hyperpixel

So i have following idea: I add one cheap Raspberry Pico or Zero and receive the Data splitted over a few I/O's from my Pi 3B+. I would take an I2C expander Board for my Pi 3B+ and write there my Outputs in a fast way, where i can read them on the other side on my Pi pico/Zero.

So, my main Problem is, that i want to create some lines of code, to write and read my Data. Does somebody have any examples or helpful links? The Data, which has to be transported is 0-255 for Brightness, Red, Green and blue. So, there are only 4x8Bits, which i would like to transfer, but i want it really fast, that i dont recognise the delay between color- and Brightness input on my Touchscreen and the changed Brightness and Color on my Adressable RGB Led-strip.


  • 1
    why would the touchscreen use all of the GPIO pins? ... which touchscreen are you using?
    – jsotola
    Dec 24, 2021 at 0:16
  • You may be able to do it wireless by sending packets back and forth. There will be some latency so it will not be as fast as a wired connection.
    – Gil
    Dec 24, 2021 at 1:38
  • Which touchscreen are you using?
    – CoderMike
    Dec 24, 2021 at 10:03

2 Answers 2


The touchscreen is unlikely to use many GPIO. Most of the GPIO on the expansion header are likely available for your use.

See https://pinout.xyz/boards and check if your board is listed.

You can always use the free GPIO by soldering wires to the underside of the expansion header pins.

  • Thank you, for your answer, but they say that my Touchscreen uses every Pin of the 40Pin header, there is really no pin left. so what can i do to communicate to my other Raspberry?
    – manintree
    Dec 24, 2021 at 9:11
  • can i maybe use i2c directly to communicate between each other?
    – manintree
    Dec 24, 2021 at 9:15
  • 1
    Not easily. The Pi only properly supports being a bus master, not being a bus slave. I think "they" are wrong in saying every pin is being used.
    – joan
    Dec 24, 2021 at 10:24
  • I use the HiperPixel4 of pimoroni, is it possible to transfer the data over i2c I/O-Expanders, which read and write several bits? So it is like a parallel data transfer
    – manintree
    Dec 24, 2021 at 17:50
  • You need to add the link pinout.xyz/pinout/hyperpixel to your initial question. That does use ALL accessible GPIO, I2C included.
    – joan
    Dec 24, 2021 at 18:44

The I2C would be your solution. It supports 127 different address,that is a lot of modules. They make port expander modules such as the MCP23017 a 16 bit port, MPC23008 a 8 bit port and many others. Simply scan for "I2C port expander" and pick your flavor. You can get these as chips DIP and SMD or as modules generally using dupont pins for connection. They can run in the $2.00 US range depending on your source. There are libraries available to use these. You can program them on a pin by pin basis to be in, out, pull up depending on the part. Some will generate an interrupt on port change if you want to use it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.