1. Carefully connect the Pi Camera to Pi (visit the Pi Foundation getting started guide for more information).

2. Follow the wiring diagram to connect the pushbutton and LEDs to the Pi GPIO pins.

  • Pushbutton: Connect one leg of the pushbutton to GPIO pin 2. Connect the other, via a resistor, to a GPIO GND pin.
  • Yellow LED:Connect the positive (longer) leg to GPIO pin 17. Connect the other leg, via a resistor, to a GPIO GND pin.
  • Blue LED: Connect the positive leg to GPIO pin 27. Connect the other leg, via a resistor, to a GPIO GND pin.
  • Green LED: Connect the positive leg to GPIO pin 22. Connect the other leg, via a resistor, to a GPIO GND pin.
  • Red LED: Connect the positive leg to GPIO pin 23. Connect the other leg, via a resistor, to a GPIO GND pin.
  • White LED: Connect the positive leg to GPIO pin 24. Connect the other leg, via a resistor, to a GPIO GND pin.

3. It is recommended to test your circuit on a breadboard and run the program before soldering or making any of the connections permanent. To do this, we'll need to write and upload our software program, so let's go to the next step!

This guide was first published on Oct 22, 2020. It was last updated on Mar 08, 2024.

This page (Build it: Hardware) was last updated on Mar 08, 2024.

Text editor powered by tinymce.