04 25 minutes
Button light
The board starts listening instead of only talking

Mission goal: Read a pushbutton on GP15 with an internal pull-up resistor and make the GP16 LED follow it: pressed means lit.
Section 1
Understand
New ideas
- Input pins versus output pins
- What a pull-up resistor does
- Why pressed reads 0 and released reads 1
- The four-leg tactile button trap
- 1A button is an input: the board listens instead of talks.
- 2With pull-up, released reads 1 and pressed reads 0.
- 3Use one leg from each internal pair of the button.
Safety first
- Unplug the USB cable before you add the button.
- Any continuity check with a multimeter is done with the board unplugged, by an adult.
- Never wire the button between 3.3 V and ground with nothing else. That is a short circuit you can create by accident when hunting for legs.