Comments on: Chapter 11: Real-Time Interfacing Using the Arduino https://www.exploringrpi.com Companion Site for the book Exploring Raspberry Pi Fri, 27 Apr 2018 02:56:25 +0000 hourly 1 https://wordpress.org/?v=5.0.1 By: Chris https://www.exploringrpi.com/chapter11/#comment-341 Thu, 08 Mar 2018 10:48:12 +0000 https://www.exploringrpi.com/?page_id=435#comment-341 I ran into the exact same issue (i2cdetect sees Arduino, but i2cdump and i2cget fail when trying to read register values). After a few days driving myself nuts with various wiring configs and coding changes, it turned out to be the i2c driver on the Pi.

Specifically, the Pi was using the i2c_bcm2835 module. I switched to the i2c_bcm2708 module, and everything worked correctly. Here’s what I did:

sudo vi /etc/modules
Comment out “i2c_bcm2835” if it’s in there.

sudo vi /boot/config.txt
Add the following line:
dtoverlay=i2c-bcm2708

Then reboot the Pi and confirm it’s using i2c-bcm2708 (NOT i2c_bcm2835):
lsmod | grep i2c

The i2c echo test should work now.

As to WHY this is happening, that would require further investigation with a scope on the SDA and SCL lines to see what’s actually going across with the i2c_bcm2835 driver. Unfortunately I don’t have access to a scope at the moment.

]]>
By: Emily https://www.exploringrpi.com/chapter11/#comment-255 Tue, 18 Jul 2017 10:14:24 +0000 https://www.exploringrpi.com/?page_id=435#comment-255 Hello,

I was trying to complete the I2C echo test between an Arduino Nano and RPi, but when I run the i2cdump command I get a table of all XXs. The i2cdetect command displays the proper output though. Any help on what might be causing this issue would be much appreciated!

]]>