Can't get BME680 working


#1

Followed instructions https://learn.pimoroni.com/tutorial/sandyj/getting-started-with-bme680-breakout but can’t get a reading from the sensor. I get “ImportError: No Module Named smbus”

I am not sure what directory I was meant to run the following code:

git clone https://github.com/pimoroni/bme680
cd bme680/library
sudo python setup.py install

I am quite new to all this. Any help would be great
Thanks


#2

I do believe if you run curl https://get.pimoroni.com/bme680 | bash you don’t have to do the setup.py install. It’s all done for you. You just do up your code in python.
If you are doing it manually make sure you enable i2c in Raspberry Pi configuration. The one line installer does this for you but if your doing the manual install you have to enable it yourself. Also if you plan on using python 3, run sudo python3 setup.py install
If you open the terminal window, you just run cd bme680/library from the default directory it opens from. That’s all I’ve ever done with stuff like this.
https://github.com/pimoroni/bme680 scroll down to the readme.md section


#3

smbus is available via apt:

sudo apt install python-smbus python3-smbus

#4

I followed all the instructions and have made sure the i2c is enabled. But it didn’t work, Thanks for trying


#5

I will try that tomorrow thanks


#6

Thanks, that worked.


#7

Thanks I needed to do this as well, apparently. Maybe worth adding into the script?