Raspberry Pi SPI and I2C Tutorial
Contributors:
Byron J., Shawn Hymel
Connecting To The Ports
Before we get into the configuration and software examples, lets locate the pins used by each of these interfaces.
If you're directly connecting to the pins on the Pi, they're a little disorganized. I2C.1 is near one end, while SPI and I2C.0 are in the middle of the header. If you're connecting to these pins, be sure to count carefully.
Pi Serial Bus Pins
The Pi Wedge adapter PCB rearranges the pins, and labels them clearly. We'll be using the Wedge for the following examples.
Wedge Serial Bus Pins