harmsobuk
Posts: 27
Joined: Thu Dec 04, 2014 1:27 pm

i2cdetect command not found

Sun Feb 22, 2015 11:02 am

hi there,

i have been trying to figure out i2c for a while now, but i keep running into problems
i wanted to connect a mcp23017 to my raspberry pi, and i followed multiple online tutorials. but at one point, i had to type in sudo i2cdetect, but then i get the "sudo: i2cdetect: command not found" error message.
i tried to fix this problem, but i couldn't find a answer to my question.

my setup:
i have a raspberry pi b+ (model 1)
the MCP23017 is the bus i used
i have installed the latest version of raspbian (01-30-15)

Harm

DirkS
Posts: 10127
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: i2cdetect command not found

Sun Feb 22, 2015 11:04 am

Install i2c-tools

Code: Select all

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

Houtkamp
Posts: 8
Joined: Wed Dec 18, 2013 6:50 pm

Re: i2cdetect command not found

Mon Jul 06, 2015 4:14 pm

Hey, anybody got this working? Mine says:

~ $ sudo i2cdetect -y 1
Error: Unsupported option "-1"!
Usage: i2cdetect [-y] [-a] [-q|-r] I2CBUS [FIRST LAST]
i2cdetect -F I2CBUS
i2cdetect -l
I2CBUS is an integer or an I2C bus name
If provided, FIRST and LAST limit the probing range.

User avatar
joan
Posts: 14668
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: i2cdetect command not found

Mon Jul 06, 2015 4:57 pm

Houtkamp wrote:Hey, anybody got this working? Mine says:

~ $ sudo i2cdetect -y 1
Error: Unsupported option "-1"!
Usage: i2cdetect [-y] [-a] [-q|-r] I2CBUS [FIRST LAST]
i2cdetect -F I2CBUS
i2cdetect -l
I2CBUS is an integer or an I2C bus name
If provided, FIRST and LAST limit the probing range.
The syntax is
i2cdetect - y 1

or

i2cdetect 1

I don't know why your system appears to be confused by the -y, you get a similar message if you have a space between the - and the y.

Return to “Interfacing (DSI, CSI, I2C, etc.)”