My usecase is as such - I've got 2 RasPi Zeros, one of which is acting as an input for a USB device. I'd then want to forward some data via GPIO to the second one, which acts as a USB device connected to something else. Would this be okay, or would I need to take care with grounding and such?

Furthermore, to make it easier I was going to try use a header connector as such:


Would that lead to any issues or would I just be better off soldering the leads I need?

  • What's an "input for a USB device"? A power supply? A USB host? A HID gadget? Also, "would I need to take care with grounding and such?" can only be answered with "yes, you need adequate grounding and such". A more specific question could lead to a more specific answer. Jul 18, 2019 at 12:31

1 Answer 1


You need to connect the ground of the two Pis together as well as any GPIO you want to use for data transfer.

If the grounds are not connected the Pis can not tell if a GPIO is set high or low by the other Pi.

As @Arnaud suggests it would be sensible to add a resistor somewhere in-line between each Pi GPIO to other Pi GPIO connection. Something of the order of 1 k ohms. This will limit the current to a safe level if opposite GPIOs are mistakenly both set in OUTPUT mode, with one high and one low.

Soldering is more secure than using headers but may not make much of a difference to your use. Are you expecting a lot of vibration?

  • Some resistors could be of the party I think ! Jul 18, 2019 at 11:45
  • I never bother, but I take your point, I'll add it to the answer.
    – joan
    Jul 18, 2019 at 12:19
  • Oh really ? I thought it would make bad thing happen... High impedance in input mode protect the other side ? Jul 18, 2019 at 12:22
  • 1
    If a GPIO is in INPUT mode it is in high impedance mode. There is only a problem if both GPIO are set as outputs (and frankly I think the risk of that is overrated as I have done so on numerous occasions without causing any known problems).
    – joan
    Jul 18, 2019 at 12:28

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.