Serial Peripheral Interface Circuit (SPI), Inter-Integrated Circuit (I2C), and 1-wire are standardized communication interfaces and protocols that allow non-trivial electronics to communicate with each other. These protocols can be employed either directly at a low level through a bit of manipulation and math, or indirectly by using higher-level party Python driver modules to work with electronic peripherals, with the latter being more common for general use cases.
Examples of devices that work through these protocols include the following:
- Analog-to-digital converters (SPI or I2C)
- LED lighting strips and LCD displays (SPI or I2C)
- Environmental sensors such as temperature sensors (1-wire)
We will explore I2C in more detail later in this chapter when we connect an analog-to-digital converter to our Raspberry Pi.
Finally, we have serial communication and UART.