博文

目前显示的是标签为“GPIO pins”的博文

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...

What pins on Raspberry Pi 5 can use PWM?

图片
  The Raspberry Pi 5 has significantly improved and expanded its PWM capabilities compared to its predecessors. Here's a detailed breakdown of the PWM pins on the Raspberry Pi 5. Quick Answer: Which GPIO Pins Have PWM? The Raspberry Pi 5 has  up to 10 independent PWM channels  that can be output on multiple GPIO pins. PWM0:  GPIO  12 ,  18 ,  40 PWM1:  GPIO  13 ,  19 ,  41 ,  45 PWM2:  GPIO  10  (Note: This is also used for the EEPROM for HATs, so use with caution) PWM3:  GPIO  11  (Note: This is also used for the EEPROM for HATs, so use with caution) PWM4:  GPIO  20 ,  42 ,  52 ,  54 PWM5:  GPIO  21 ,  43 ,  53 ,  55 PWM6:  GPIO  6 ,  31 ,  56 PWM7:  GPIO  7 ,  31 ,  57 PWM8:  GPIO  2 ,  8 ,  44 PWM9:  GPIO  3 ,  9 ,  44 ⚠️ Important Note:  You can only use ...