Raspberry Pi I2C Connectors and Pinout
I2C - Inter Integrated Circuit
I2C pins in BCM mode are: 2, 3
I2C pins in WiringPi are: 8, 9
The UART pins are 14 and 15, TXD, RXD. /dev/serial0
sudo apt-get install i2c-tools
sudo i2cdetect -y 1
DEVICE_BUS = 1
DEVICE_ADDR = 0x15
bus = smbus.SMBus(DEVICE_BUS)
bus.write_byte_data(DEVICE_ADDR, 0x00, 0x01)
- Example with a pimoroni scrollphathd
Thanks to our friends at: https://pinout.xyz/pinout/i2c
and then find serial port in the menu, then ansswer NO to the login shell question, and YES question about serial hardware port.
use a MAX232 adapter to connect RS232 devices to the TXD / RXD pins.