← MicroPython on Pi Pico and Projects
Chapter 4 Companion
Chapter 4 Notes Page
Fill this out as you read Chapter 4, Physical computing with Raspberry Pi Pico. You can write your answers in your own words: you do not need full sentences.
Name: Period: Date:
Part 1: Hello, LED!
Vocabulary
| Word | What it means |
|---|---|
machine library | |
Pin | |
OUT | |
.value() | |
.toggle() |
Careful reading
- The on-board LED can't be wired to external hardware. What's the special name you use instead of a pin number to control it?
-
You ran a program with
led_onboard.value(1)and never saw the LED light up, even though it did turn on. Why couldn't you see it? -
What's the difference between writing
led_onboard.value(1)thenled_onboard.value(0), versus just callingled_onboard.toggle()inside a loop?
Part 2: Using a Breadboard
- Holes in the same numbered column (like A1 and B1) are connected by a hidden metal strip called a .
- What are the power rails along the top and bottom of a breadboard used for?
- Why does the chapter warn you to never cram two component leads into the same hole?
Part 3: Wiring an External LED
Vocabulary
| Word | What it means |
|---|---|
| Anode | |
| Cathode | |
| Current-limiting resistor |
- Which lead of the LED, the longer or the shorter one, is the anode?
- What could happen to the LED, or even to your Pico, if you connected the LED without a current-limiting resistor?
Draw the path current takes through this circuit, starting at the GPIO pin. Label each part: GPIO pin, resistor, anode, LED, cathode, ground.
Part 4: Reading a Button
Vocabulary
| Word | What it means |
|---|---|
| Pull-up resistor | |
| Pull-down resistor | |
| Floating input |
-
This chapter's button circuit uses a pull-up resistor. When the button is not pressed, what value does
button.value()return? - You don't have to wire up a separate resistor for the button like you did for the LED. Where is the resistor actually coming from?
-
The button-reading loop includes
time.sleep(2)after printing a message. What goes wrong if you leave that line out?
Wrap-up: 3-2-1
- Write 3 things you learned in this chapter.
- Write 2 questions you still have.
- Write 1 way this chapter connects to something you already know or have seen before.