I am trying to use I2C6 on the Edison Breakout Board via Python and mraa, but I haven't had any luck in doing so, even though everything works fine on I2C1.
I used a BME280 for the following tests:
# !/usr/bin/env python
import mraa as m
if __name__ == "__main__":
bme = m.I2c(0)
print("BME WhoAmI: %s" %bme.readReg(0xD0))
I am using the Yocto image '20160315'. Similar outcomes were observed on other I2C devices.
Do I need to change something in the Python script? Or configure something in Linux?
Thank you for your help!
When using the command bme = m.I2c(0) you're actually using i2c6, not i2c1. Do you need to connect several i2C devices? If that's the case then the approach to follow is by assigning a different address to each I2C device
You can see more information related to the I2C buses and addresses here
/message/360174# 360174 https://communities.intel.com/message/360174# 360174
/message/344099# 344099 https://communities.intel.com/message/344099# 344099
Thanks for the hints.
The key was to specify the right bus number in the line 'bme = m.I2c(X)' below are my findings: