Parts
CircuitPython libraries and adafruit-blinka will work on any Raspberry Pi board! That means the original 1, the Pi 2, Pi 3, Pi 4, Pi 5, Pi Zero, Pi Zero 2 W, or even the compute module.
If you're following along with a Raspberry Pi, we're going to use a T-Cobbler Plus for the IO Basics Projects. This add-on prototyping board lets you easily connect a Raspberry Pi (Raspberry Pi Model Zero, Zero 2 W, A+, B+, Pi 2, Pi 3, Pi 4, Pi 5) to a solderless breadboard.
You will also need the following parts:
The Raspberry Pi lacks analog pins, which are required for this guide. We can use an Analog-To-Digital converter to add this capability to the Pi. We suggest using the MCP3008 - it costs a few bucks, provides eight, 10-bit channels of analog conversion, and works with Adafruit Blinka.
You'll need to place the MCP3008 chip into the breadboard. If you haven't done this before, line up the legs of the chip such that the legs sit on opposite sides of the empty channel in the middle of the breadboard.
The orientation of the MCP3008 matters - be sure to place it on the breadboard with the half-circle and dot towards the Adafruit logo on the Pi T-Cobbler:
Once the MCP3008 is pushed into the breadboard, we're ready to start wiring the circuit according to the diagram below. Each of the legs of the MCP3008 is named according to the pinout on the left.
Make the following connections between the Raspberry Pi and the MCP3008:
- MCP3008 Pin 16 to 3.3V.
- MCP3008 Pin 15 to 3.3V.
- MCP3008 Pin 14 to Ground.
- MCP3008 Pin 13 to Pi SCK.
- MCP3008 Pin 12 to Pi MISO.
- MCP3008 Pin 11 to Pi MOSI.
- MCP3008 Pin 10 to Pi Pin 21.
There are also a few connections to make between the individual components on the board:
- MCP3008 Pin 1 to the left leg of the 10k ohm resistor.
- The left leg of the photocell to 3.3V.
- The right leg of the photocell to the left leg of the 10k ohm resistor.
- The right leg of the 10k ohm resistor to Ground.
Page last edited
Text editor powered by tinymce.