b. setup(18, GPIO.OUT)
c. outout(18)
d. wait_for_edge(18, GPIO.FALLING)
2. The GPIO pin numbers on the Raspberry Pi match the GPIO signal numbers on the Broadcom
chip. True or false?
3. What add_event_detect() parameter can you add to help prevent switch bounce?
Answers
1. b. The setup(18, GPIO.OUT) statement tells the Raspberry Pi to set the GPIO signal 18
for output.
2. False, so be careful when you’re writing your Python programs! You should always include the
setmode() function to define whether your code uses
3. Use the bouncetime parameter to set a time limit between event detections. This will help
reduce switch bounce problems.