How to fix Raspberry Pi i2cdetect: command not found

Problem:

When trying to detect I2C devices on the Raspberry Pi (Raspbian) using i2cdetect, you see the following error:

i2cdetect_error_output.txt
$ i2cdetect
bash: i2cdetect: command not found

Solution

Install i2c-tools using

install_i2c_tools.sh
sudo apt -y install i2c-tools

After installing i2c-tools , you can use i2cdetect and other related tools such as i2cget.


Check out similar posts by category: Embedded, Linux, Raspberry Pi