I just got a raspberry Pi, and I am more familiar with software than hardware. Can I plug my ribbon cable into the GPIO pins if my Pi is on?

  • there's nothing to prevent you to do that, however I would not recommend it.
    – lenik
    Aug 2, 2014 at 10:18

3 Answers 3


The simple answer is it depends, partly on what is connected at the other end.

Strictly you should NOT, as you cannot guarantee what order connections would be made. (USB etc devices designed for hot plugging have mechanisms to ensure Ground and Power are connected before data.)

In practice it is unlikely to cause any damage, unless there is a possibility of connecting +5V to GPIO pins.

  • Well put. I remember when I set up a hot-plug RAID system that the connectors had the power pins extend slightly further out than the data pins because the electronics were happier if they had power before data, even if by only a few ms.
    – SDsolar
    May 3, 2017 at 16:48

As your questions stands, yes you can plug a ribbon cable into the Pi.

This is the same as manually connecting each GPIO pin to a single piece of wire.

What are you plugging it into?

As with any hardware on the GPIO I would recommend only plugging/unplugging when the power is Pi is off and the power disconnected.


I just tried hotplugging the Adafruit 128x64 OLED Bonnet into a Raspberry Pi 4B, and the Pi locked up hard (had to be power cycled).

Edit: I have no idea why this answer is being downvoted. I put this to the test to answer the question (at the risk of destroying my hardware, I later found out in the comments) -- and the answer was clearly no, hotplugging doesn't work.

  • 1
    You're lucky you didn't destroy your RPI4B or your OLED or both. The GPIO is NOT hot pluggable.
    – Dougie
    Nov 22, 2020 at 23:13
  • Yes, I discovered that :-D I am indeed lucky that it still works. It strikes me that there are several very poorly designed things about the GPIO block -- starting with the fact that the plug is reversible, and most shields don't even have pin 1 labeled! Nov 23, 2020 at 9:04
  • @Dougie What on earth is the fact for that the GPIO isn't hot-pluggable! What do you base that statement on? I would say that if you use a 40 pin connector it isn't recommended, but to connect one pin or another, just be sure that you connect GND first before connecting pins with power, exactly as a "Hot plug" connector is designed.. Nov 23, 2020 at 20:19
  • @LukeHutchison You should add your answer as a comment! Nov 23, 2020 at 20:20
  • 1
    @MatsKarlsson I do not see, how this contribution (i.e. first-hand experience) does not provide an answer to the question. Furthermore it does neither seem to fit the bill what comments are for nor what answers are not for. That being said I need to ask y'all to calm down and not let this get out of hand. Thank you.
    – Ghanima
    Nov 24, 2020 at 12:06

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.