Digital I/O Quiz
Digital I/O Quiz
Test your knowledge of pinMode, digitalWrite, and button wiring. — 6 questions
About the Digital I/O Quiz
Test your knowledge of pinMode, digitalWrite, and button wiring. 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 Digital I/O on Arduino guide and the Digital I/O 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. What value does digitalRead() return when a pin configured as INPUT_PULLUP is connected to GND?
Show answer
Answer: B. LOW
INPUT_PULLUP pulls the pin to HIGH internally. When you connect it to GND (e.g. press a button), it reads LOW.
2. Why do you need a resistor in series with an LED?
Show answer
Answer: B. To limit current and prevent burning out the LED or pin
Without a current-limiting resistor, too much current flows through the LED, burning it out or damaging the Arduino pin.
3. What does pinMode(9, OUTPUT) do?
Show answer
Answer: C. Configures pin 9 to drive voltage (output mode)
pinMode() configures the direction of a pin. OUTPUT means the pin can source/sink current to drive components.
4. What is debouncing a button?
Show answer
Answer: B. Filtering out rapid noise signals when a button is pressed
Mechanical buttons produce brief electrical noise when pressed. Debouncing ignores readings for a short time after the first state change.
5. Which mode should you use to read a button without adding an external resistor?
Show answer
Answer: C. INPUT_PULLUP
INPUT_PULLUP activates the Arduino built-in pull-up resistor, so the pin defaults to HIGH and reads LOW when the button connects it to GND.
6. What is the maximum current you should draw from a single Arduino Uno digital pin?
Show answer
Answer: B. 40 mA
Each Arduino Uno pin can safely source or sink up to 40 mA. The total for all pins combined is 200 mA.
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.