← 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

WordWhat it means
machine library
Pin
OUT
.value()
.toggle()

Careful reading

  1. 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?

  2. 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?

  3. What's the difference between writing led_onboard.value(1) then led_onboard.value(0), versus just calling led_onboard.toggle() inside a loop?

Part 2: Using a Breadboard

  1. Holes in the same numbered column (like A1 and B1) are connected by a hidden metal strip called a .
  2. What are the power rails along the top and bottom of a breadboard used for?

  3. Why does the chapter warn you to never cram two component leads into the same hole?

Part 3: Wiring an External LED

Vocabulary

WordWhat it means
Anode
Cathode
Current-limiting resistor
  1. Which lead of the LED, the longer or the shorter one, is the anode?

  2. 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

WordWhat it means
Pull-up resistor
Pull-down resistor
Floating input
  1. This chapter's button circuit uses a pull-up resistor. When the button is not pressed, what value does button.value() return?

  2. 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?

  3. 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

  1. Write 3 things you learned in this chapter.

  2. Write 2 questions you still have.

  3. Write 1 way this chapter connects to something you already know or have seen before.