I2C bus debugging

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

I2C bus debugging

AlfredC
Administrator
This post was updated on .
LiV uses three I2C devices: LCD screen (0x27 or 0x3F), BMP180 (0x77), DS3231(0x68 & 0x57)
If you have issues detecting any of your I2C devices, this is a general testing procedure:

-power off LiV with "sudo shutdown now". Turn off power.
-remove all your I2C devices from their connectors.
-power up LiV
-look at all LiV processes with "ps aux| grep liv"
-kill all of them with "sudo pkill -f liv*"
-make sure they're gone with "ps aux| grep liv"
-"sudo i2cdetect -y 1" should shows no devices

-insert LCD screen. Pay attention so the GND matches at both end of the cable (straight cable). LCD light should turn on. If it doesn't, there is a connection issue you have to solve.
-"sudo i2cdetect -y 1" should show address 0x27 or 0x3F
-test LCD display: "cd ~/liv/livLCD" and "sudo python lcd16x2.py"

-insert BMP180 sensor in the dedicated connector with the right orientation (refer to photo on the assembly page in DIY instructions).
-"sudo i2cdetect -y 1" should show value 0x77.
-check sensor: "cd ~/liv/livDB" and "sudo python airPressureSensor.py"

-insert DS3231 module in the dedicated spot with the right orientation (refer to photo on the assembly page in DIY instructions)
-"sudo i2cdetect -y 1" should show values 0x68 and 0x57


If you are using a RPi 2 and you see errors from i2cdetect when you check BMP180, "cd ~/liv/livDB/Adafruit_Python_BMP" and "sudo python setup.py install".  

-turn off LiV with "sudo shutdown now". Turn off power.
-power up LiV
-all I2C devices should be up and running
-"sudo i2cdetect -y 1" shows all I2C addresses. I2C address 0x68 shows "UU" (this is OK, it shows it's being utilised by driver)