Enabling I2C on TX1

As a test, I wanted to see if I could use the GPIO I2C pins (3 and 5) to communicate with an Arduino Uno. The idea is to send numbers back and forth between them with smbus in Python on the TX1 side.

However, even with the arduino sketch running http://blog.oscarliang.net/raspberry-pi-arduino-connected-i2c/ (the arduino part) before using i2cdetect -y 0, I can’t see anything at all. None of the i2c buses seem to be seeing anything on the Tegra.

Am I doing something wrong here?

Did you use ‘sudo’ on the i2cdetect command? I usually use something like:

$ sudo i2cdetect -y -r 0

You can also try pins 27 and 28 as in this article: http://jetsonhacks.com/2015/12/08/gpioi2c-on-jetson-tx1-lidar-lite-v2-installation/

Oh my gosh!

I was actually going to do a really rude reply saying something stupid like “I already TRIED sudo!” or something, but the -r switch is what was wrong!

Thank you so much for saving me!

By any chance, what does the -r switch do?

The -r switch: Use SMBus “read byte” commands for probing

I’ve found in most public forums that rude replies usually only result in both parties being frustrated, and is a waste of time. The person trying to answer the question only has the body of the question to work from, the person who is writing the question is trying to relay all of the information that they have. It seems natural that it might take a couple of back and forths to get on the same page.

Glad you got it to work.