I2C (Inter-Integrated Circuit)
Synchronous serial protocol using only 2 wires: SDA (data) + SCL (clock).
- Supports up to 1008 peripheral devices on the same bus
- Each device has a unique hexadecimal address
- Slower than SPI but simpler wiring (only 2 wires vs 4+)
- Detect devices:
i2cdetect -y 1
Python: smbus2 library
from smbus2 import SMBus
with SMBus(1) as bus:
b = bus.read_byte_data(addr, register)Devices in course: AHT20 sensor, accelerometer, light sensor, LCD driver.
See Also
- Serial Protocols topic