Pico W GPIO & PWM Quiz
Pico W GPIO & PWM Quiz
Test your knowledge of Pin modes, ADC, PWM, and interrupts. — 6 questions
About the Pico W GPIO & PWM Quiz
Test your knowledge of Pin modes, ADC, PWM, and interrupts. This quiz has 6 multiple-choice questions. Each question has one correct answer, and you see an explanation straight after you answer, so you learn from every question — including the ones you get wrong. There is no time limit and nothing to sign up for; your answers are not stored.
The questions follow the material in the GPIO & PWM on Raspberry Pi Pico W guide and the Pico W GPIO & PWM Cheatsheet. Read them first if you want to prepare, or take the quiz cold to find the gaps in what you know.
Questions in this quiz
Preview the questions below. Each answer and its explanation are hidden until you choose to reveal them, so you can still take the quiz above without spoilers.
1. Which GPIO pins on the Pico W support analog input (ADC)?
Show answer
Answer: B. GPIO 26߀“28
Only GPIO 26, 27, and 28 are connected to the RP2040 ADC hardware. Plus ADC channel 4 for the internal temperature sensor.
2. What range does adc.read_u16() return?
Show answer
Answer: D. 0߀“65535
read_u16() returns a 16-bit value (0߀“65535) regardless of the ADC hardware resolution, for consistency across MicroPython ports.
3. What value passed to pwm.duty_u16() gives approximately 50% duty cycle?
Show answer
Answer: C. 32768
duty_u16 takes a value from 0 to 65535. Half of 65535 ߉? 32768 gives 50% duty cycle.
4. Which interrupt trigger fires when a button (with PULL_UP) is pressed?
Show answer
Answer: B. Pin.IRQ_FALLING
With PULL_UP, the pin is HIGH when the button is open. Pressing the button pulls it to GND (HIGH߆’LOW = FALLING edge).
5. What does Pin.PULL_UP do?
Show answer
Answer: B. Activates an internal resistor that holds the pin HIGH when nothing is connected
PULL_UP enables the internal pull-up resistor on the pin, keeping it at a known HIGH state when the pin is floating.
6. What function should you call to release a PWM channel when finished?
Show answer
Answer: C. pwm.deinit()
pwm.deinit() releases the PWM hardware resources and frees the pin for other uses.
How to use this quiz
- Answer every question before reading the explanations below — retrieving an answer from memory is what makes it stick.
- Note the questions you missed and revisit the matching section of the guide or cheatsheet.
- Retake the quiz a day or two later. Spaced repetition is one of the most reliable ways to remember technical details.