Self-check
- In this activity, you:
- Measured continuity between various combinations of the pushbutton’s pins while it was pressed and not pressed.
- Looked inside the pushbutton to see how pressing it made the electrical connections change.
- Examined the functions of the resistors in the pushbutton circuit.
- Do you understand the continuity inside the pushbutton?
- Do you understand how the pull-down and pull-up resistors work inside the pushbutton circuits?
- Were you able to successfully use methods specific to the pushbuttons scripts to manipulate the pushbuttons and LEDs
Questions
- Which pushbutton pins are always connected to each other?
- When the pushbutton is pressed, what is the voltage through the circuit and why?
- What function does a pull down resistor have in a circuit?
- Describe "active-high."
- When a pushbutton doesn’t work as expected, what is one of the first things that professionals check?
Exercises
- In simple terms how would you describe a schematic of a pull-down resistor circuit versus a pull-up resistor circuit?
- How does display.off() impact pin 6?
- How does pin6.set_pull(pin6.NO_PULL) work within a pushbutton circuit connected to P6?
Project
Imagine that you want a light to blink red when nothing is sensed but to stop when an object is present, much like an automatic door opens when you step on a mat, but is closed the rest of the time. Write a script so that your new pushbutton pull-up circuit flashes the red LED without a pushbutton press and turns off when you press the pushbutton.