Bird
0
0

What does GPIO.setup(pin, GPIO.IN) do in Raspberry Pi programming?

easy📝 Conceptual Q11 of 15
Raspberry Pi - GPIO Basics with Python
What does GPIO.setup(pin, GPIO.IN) do in Raspberry Pi programming?
ASets the pin as an input to read signals
BSets the pin as an output to send signals
CResets the pin to default mode
DDisables the pin
Step-by-Step Solution
Solution:
  1. Step 1: Understand the function purpose

    GPIO.setup configures a pin's mode on the Raspberry Pi.
  2. Step 2: Identify the mode set by GPIO.IN

    GPIO.IN sets the pin to input mode, allowing it to read signals.
  3. Final Answer:

    Sets the pin as an input to read signals -> Option A
  4. Quick Check:

    GPIO.IN means input mode [OK]
Quick Trick: IN means input mode to read signals [OK]
Common Mistakes:
  • Confusing IN with OUT mode
  • Thinking it resets or disables the pin
  • Assuming it sets output mode

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Raspberry Pi Quizzes