Lab 4 Hardware Foundations
Breadboards, LEDs, Resistors, Jumper Cables, and Pico Pins
CMPSC 100 Computational Expression
Breadboards: The Circuit Playground
Breadboard Basics
- Breadboards let you build circuits without soldering.
- Power rails (red/blue lines) run vertically—each column is connected, but left and right rails are separate.
- Middle rows connect horizontally—each row is split by the center gap.
- Example: All holes in row 10 (left side) are connected; all holes in the first blue bus are connected, but not to the second blue bus.
- Tip: Always double-check connections—misplaced wires are a common error!
- First time using a breadboard? Push components in gently and make sure the legs are straight.
Pico 2 Pins
Refer to the pinout diagram to identify GPIO pins, power (3V3), and ground (GND).
LEDs: Light Emitting Diodes
LED Basics
- LEDs only work in one direction!
- Long leg = positive (anode), connects to HIGH voltage (3.3V or 5V).
- Short leg = negative (cathode), connects to LOW voltage (GND).
- Common mistake: LED facing the wrong way—always check leg orientation!
- In Lab 4: Each LED is controlled by a GPIO pin on the Pico.
- Tip: If your LED doesn’t light up, try flipping it around!
Resistors: Controlling Current
Resistor Basics
- Resistors limit the flow of electrical current.
- Color bands show resistance value (measured in ohms Ω).
- Why use them? Protect LEDs from too much current—without a resistor, your LED can burn out!
- Lower resistance = brighter LED. Higher resistance = dimmer LED.
- Typical values: 220Ω (bright), 330Ω (safe and slightly dimmer).
- Tip: Place the resistor in series with the LED—one leg in the same row as the LED anode, the other to the Pico pin.
Jumper Cables: Making Connections
- Jumper cables are flexible wires for connecting components on the breadboard.
- Male-to-male cables are most common for breadboards.
- Use them to connect Pico pins to LEDs, resistors, and power rails.
- Tip: Use different colors for clarity (e.g., red for power, black for ground) but colors do not affect functionality.
- Push cables in firmly but gently—loose connections are a common source of problems.
Pico Pins and Power
![]()
- Pico GPIO pins control LEDs and read sensors.
- 3V3 (Power): Connects to the breadboard’s red power rail.
- GND (Ground): Connects to the blue ground rail.
- Pin numbers (e.g., 15, 14, 13) are used in your code to control LEDs.
- Always disconnect USB before wiring! Prevents short circuits and protects your board.
- Tip: Use the pinout diagram to find the correct pins for your circuit.
Common Mistakes and Troubleshooting
- LED not lighting up?
- Check orientation (long leg to power, short leg to ground).
- Check connections—are all wires fully inserted?
- Try a different GPIO pin in your code.
- Multiple LEDs not working?
- Check that all resistors are in place.
- Make sure each LED has its own resistor.
- Verify power and ground rails are connected to the Pico.
- Breadboard confusion?
- Remember: Power/ground rails are vertical, component rows are horizontal.
- The center gap splits the board—components on one side aren’t connected to the other.
Quick Tips for Success
- Double-check LED orientation (long leg to power, short leg to ground).
- Use resistors for every LED—protect your hardware!
- Keep wiring neat—use color-coded jumper cables.
- Understand breadboard connections—vertical for power/ground, horizontal for components.
- Refer to the Pico pinout diagram when connecting your circuit.
- Test your circuit with
test_LED.py
before starting the full light show!