Does GPIO 2 on Raspberry Pi 5 work like GPIO 4
Short answer: electrically they’re mostly the same as GPIOs, but they are not identical in function or “gotchas”. Also, be careful: “GPIO 2” ≠ “pin 2” on the header. 1. If you meant physical pin 2 vs pin 4 On Raspberry Pi 5 : Pin 2 = 5 V power Pin 4 = 5 V power Both are fixed 5 V supply pins , not GPIO at all. You cannot use them like GPIO4. So: ❌ Pin 2 does not work like GPIO 4 (BCM 4). It’s just a 5 V output from the power supply. 2. If you meant BCM GPIO2 vs BCM GPIO4 On the Raspberry Pi 5 header: GPIO2 = BCM2, physical pin 3 → default I²C1 SDA GPIO4 = BCM4, physical pin 7 → a “normal” GPIO with extras like GPCLK0 , and often used as the default 1-Wire pin . They are similar in that: Both are 3.3 V GPIOs in the same IO bank on Pi 5. You can configure each as input or output in your code. But they differ in details: Fixed pull-up on GPIO2 GPIO2 (and GPIO3) have a permanent pull-up to 3.3 V because they are the mai...