Bird
0
0

Which of the following is the correct syntax to set GPIO pin 22 to LOW using GPIO.output()?

easy📝 Syntax Q3 of 15
Raspberry Pi - GPIO Basics with Python
Which of the following is the correct syntax to set GPIO pin 22 to LOW using GPIO.output()?
AGPIO.output(22, GPIO.LOW)
BGPIO.output(22, LOW)
CGPIO.output(GPIO.LOW, 22)
DGPIO.output(22, 1)
Step-by-Step Solution
Solution:
  1. Step 1: Use correct constant for LOW state

    GPIO.LOW is the proper constant to represent a LOW voltage level in the GPIO library.
  2. Step 2: Confirm parameter order

    The first argument is the pin number, second is the state constant.
  3. Final Answer:

    GPIO.output(22, GPIO.LOW) -> Option A
  4. Quick Check:

    GPIO.output(pin, GPIO.LOW) = Set pin LOW [OK]
Quick Trick: Always use GPIO.LOW constant, not just LOW or 0 [OK]
Common Mistakes:
  • Using LOW without GPIO prefix
  • Swapping parameters
  • Using numeric 0 instead of GPIO.LOW

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Raspberry Pi Quizzes