In Chapter 10, Sensing and Displaying Real-World Data, we connected to devices using a bus protocol called I2C. Raspberry Pi also supports another chip-to-chip protocol called Serial Peripheral Interface (SPI). The SPI bus differs from I2C because it uses two single direction data lines (where I2C uses one bidirectional data line).
Although SPI requires more wires (I2C uses two bus signals, SDA and SCL), it supports the simultaneous sending and receiving of data and much higher clock speeds than I2C:
The SPI bus consists of the following four signals: