Bird
0
0

Which of the following is the correct way to set the GPIO pin numbering mode to use the physical pin numbers?

easy📝 Conceptual Q2 of 15
Raspberry Pi - GPIO Basics with Python
Which of the following is the correct way to set the GPIO pin numbering mode to use the physical pin numbers?
AGPIO.setmode(GPIO.BCM)
BGPIO.setmode(GPIO.PHYSICAL)
CGPIO.setmode(GPIO.BOARD)
DGPIO.setmode(GPIO.PIN)
Step-by-Step Solution
Solution:
  1. Step 1: Recall pin numbering modes in RPi.GPIO

    GPIO.BOARD uses physical pin numbers on the Raspberry Pi header, while GPIO.BCM uses Broadcom chip numbering.
  2. Step 2: Identify the correct constant for physical numbering

    GPIO.BOARD is the correct constant for physical pin numbering. Other options are invalid or incorrect.
  3. Final Answer:

    GPIO.setmode(GPIO.BOARD) -> Option C
  4. Quick Check:

    Physical pin numbering = GPIO.BOARD = B [OK]
Quick Trick: Use GPIO.BOARD for physical pin numbers, GPIO.BCM for chip numbers [OK]
Common Mistakes:
  • Using GPIO.BCM when physical pins needed
  • Typing invalid constants like GPIO.PHYSICAL
  • Confusing pin numbering modes

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Raspberry Pi Quizzes