Type a command to check whether the I2C module is enabled:
lsmod | grep i2c
If I2C module has been enabled, the following content will show up (the numbers showing in your device may
be different):
Install I2C-Tools
Type the command to install I2C-Tools.
sudo apt-get install i2c-tools
Install python-smbus
Python-smbus is a module of the program Python, which contains some classes and methods to operate I2C.
Type the following command to install python-smbus:
sudo apt-get install python3-smbus
Communication test
The smart car board has two chips, PCF8591 and PCA9685. Their I2C addresses are 0X48 and 0X40 respectively.
Command “i2cdetect –y 1” can detect whether the board is successfully connected to Raspberry Pi.
i2cdetect -y 1
If an I2C device is connected to your RPI, its I2C address will be displayed here.