Pico W GPIO & PWM Quiz

Pico W GPIO & PWM Quiz

Test your knowledge of Pin modes, ADC, PWM, and interrupts. — 6 questions

Question 1 of 6 Score: 0

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)?

  1. GPIO 0߀“5
  2. GPIO 26߀“28
  3. GPIO 32߀“34
  4. Any GPIO pin
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?

  1. 0߀“255
  2. 0߀“1023
  3. 0߀“4095
  4. 0߀“65535
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?

  1. 128
  2. 255
  3. 32768
  4. 50
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?

  1. Pin.IRQ_RISING
  2. Pin.IRQ_FALLING
  3. Pin.IRQ_HIGH
  4. Pin.IRQ_LOW
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?

  1. Increases voltage to 5 V
  2. Activates an internal resistor that holds the pin HIGH when nothing is connected
  3. Connects pin to an external pull-up
  4. Boosts GPIO current
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?

  1. pwm.stop()
  2. pwm.close()
  3. pwm.deinit()
  4. pwm.disable()
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.

Related