Recall & Review
beginner
What does setting a pin mode to IN mean on a Raspberry Pi?
Setting a pin mode to IN means the pin is configured to read signals, like detecting if a button is pressed.
Click to reveal answer
beginner
What does setting a pin mode to OUT mean on a Raspberry Pi?
Setting a pin mode to OUT means the pin is configured to send signals, like turning an LED on or off.
Click to reveal answer
beginner
Which Python library is commonly used to set pin modes on a Raspberry Pi?
The
RPi.GPIO library is commonly used to set pin modes and control pins on a Raspberry Pi.Click to reveal answer
beginner
How do you set pin 18 as an output pin using RPi.GPIO in Python?
You use
GPIO.setup(18, GPIO.OUT) to set pin 18 as an output pin.Click to reveal answer
beginner
Why is it important to set the pin mode before using a pin on Raspberry Pi?
Setting the pin mode tells the Raspberry Pi if the pin will send signals (output) or receive signals (input), preventing damage and ensuring correct behavior.
Click to reveal answer
What does GPIO.setup(pin, GPIO.IN) do?
✗ Incorrect
GPIO.setup(pin, GPIO.IN) configures the pin to read signals, like from a sensor or button.
Which pin mode would you use to turn on an LED?
✗ Incorrect
You use OUT mode to send signals that can turn an LED on or off.
What Python library is commonly used for GPIO pin control on Raspberry Pi?
✗ Incorrect
RPi.GPIO is the standard library for controlling GPIO pins on Raspberry Pi.
What happens if you try to read a pin set as OUT?
✗ Incorrect
Reading a pin set as OUT returns the last output value sent to it.
Why should you set pin modes before using pins?
✗ Incorrect
Setting pin modes correctly prevents hardware damage and ensures the pin works as intended.
Explain what setting a pin mode to IN or OUT means on a Raspberry Pi and why it matters.
Think about whether the pin is reading or sending signals.
You got /4 concepts.
Describe how you would set up a pin as an output in Python using RPi.GPIO and what you could do with it.
Focus on the code and the purpose of output mode.
You got /4 concepts.