How to scan I2C bus in Linux

Spread the love

Just install i2c-tools. It’s a package with utilities for work with i2c bus in Linux.

At first, install i2c-tools package.

For Ubuntu/Debian:

sudo apt-get update && sudo apt-get install i2c-tools

For RedHat/Fedora/CentOS:

sudo yum install i2c-tools

After installation run

i2cdetect -y NUM

where NUM is number of i2c interface.

For review all i2c devices run command:

ls /dev | grep i2c

Добавить комментарий