0

BME280 on BeagleBone Black Wireless
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

BME280 on BeagleBone Black Wireless

by trentroc on Fri Apr 07, 2017 11:05 am

I need assistance with connecting the BME280 to the BeagleBone Black Wireless. There is a tutorial available for the BME280 but it covers the connection to an Arduino device. I wish that this tutorial would include the procedure for connecting the BME280 to a BeagleBone Black Wireless and a Raspberry Pi. I have found many posts that cover other sensors but I would like to use the BME280. I would also like to see a more updated version of the DS3231 precision RTC to include information on setting up with BeagleBone and Raspberry Pi. If anyone could assist me with any information regarding the use of the BME280 and the DS3231 RTC with the BeagleBone Black Wireless, I would greatly appreciate it. I'm​ participating in the Element 14 Road Test program and currently testing the BeagleBone Black Wireless. My intention is to utilize these Adafruit components in my final project. Thanks for your time in reading this post.

trentroc
 
Posts: 46
Joined: Wed Nov 23, 2016 11:11 am

Re: BME280 on BeagleBone Black Wireless

by trentroc on Fri Apr 07, 2017 12:38 pm

Did I post this in wrong place?!

trentroc
 
Posts: 46
Joined: Wed Nov 23, 2016 11:11 am

Re: BME280 on BeagleBone Black Wireless

by drewfustini on Fri Apr 07, 2017 5:57 pm

Yes, this is the right place for your post.

For BME280, you'll want to wire it up to the i2c bus pins.
Image

Here is a Python library that should work:
https://github.com/adafruit/Adafruit_Python_BME280

For DS3231 RTC, the Linux kernel does support it with the DS1037 driver. You'll want to wire it up to the i2c bus pins, too. Check out this page for more information:
Introduction to BeagleBone Black I2C with the CryptoCape Real-Time Clock

If you have trouble with the wiring, then please attach a photo of your breadboard and BeagleBone.

drewfustini
 
Posts: 944
Joined: Sat Dec 26, 2015 1:19 pm

Re: BME280 on BeagleBone Black Wireless

by trentroc on Fri Apr 07, 2017 6:22 pm

You rock!! Thank you very much for assisting me with this. This information helps me out so much. I will​ post a photo as instructed if I have any issues. Thank you very much for your time.

trentroc
 
Posts: 46
Joined: Wed Nov 23, 2016 11:11 am

Re: BME280 on BeagleBone Black Wireless

by trentroc on Wed Apr 12, 2017 12:56 pm

My Beaglebone Black Wireless isn't detecting any of connected i2c. i2cdetect not showing anything connected. I have both Adafruit DS3231 RTC and Adafruit BME280 VCC connected to P9_7, GND to P9_1 , SDA and SD I connected to P9_20, and SCL and SCK connected to P9_19. I can't figure this out. Please help

trentroc
 
Posts: 46
Joined: Wed Nov 23, 2016 11:11 am

Re: BME280 on BeagleBone Black Wireless

by trentroc on Wed Apr 12, 2017 1:32 pm

Here is a photo of my wiring
Attachments
DSC_0785.JPG
DSC_0785.JPG (159.46 KiB) Viewed 1273 times

trentroc
 
Posts: 46
Joined: Wed Nov 23, 2016 11:11 am

Re: BME280 on BeagleBone Black Wireless

by bebo on Wed Apr 12, 2017 2:49 pm

I have a MCP9808 connected via I2C, running normally, yet i2cdetect returns nothing. I have a BME280 on another project, I'll pull it off this evening and try to get it running on the BeagleBone. I'll let you know how it works out

bebo
 
Posts: 92
Joined: Tue Mar 29, 2011 8:22 am

Re: BME280 on BeagleBone Black Wireless

by trentroc on Wed Apr 12, 2017 3:02 pm

Thanks for your time. I was able to get the DS3231 RTC working but for some reason nothing was saved after I shutdown. I am so frustrated with this I'm almost at the point of throwing it all away.

trentroc
 
Posts: 46
Joined: Wed Nov 23, 2016 11:11 am

Re: BME280 on BeagleBone Black Wireless

by trentroc on Wed Apr 12, 2017 4:01 pm

"i2cdetect -y -r 2" works in showing ID 68 and ID 77. 0x68 is the DS3231 and 0x77 is the BME280. Where is the BME280 driver supposed to be placed? The tutorial for it only covers how to set up with Arduino.

trentroc
 
Posts: 46
Joined: Wed Nov 23, 2016 11:11 am

Re: BME280 on BeagleBone Black Wireless

by trentroc on Wed Apr 12, 2017 4:26 pm

Error. Can't open file Adafruit_BME280_Example.py no such file in directory but I just downloaded with "git clone https://github.com/adafruit/Adafruit_Python_BME280.git" I just want to get this to work. It shouldn't be this difficult to get the BME280 working on BeagleBone Black Wireless. Can someone please help me out!?

trentroc
 
Posts: 46
Joined: Wed Nov 23, 2016 11:11 am

Re: BME280 on BeagleBone Black Wireless

by bebo on Wed Apr 12, 2017 6:32 pm

Are you running Python as sudo? and can you find the example.py file in your directory? the same directory you are running Python from?

bebo
 
Posts: 92
Joined: Tue Mar 29, 2011 8:22 am

Re: BME280 on BeagleBone Black Wireless

by trentroc on Wed Apr 12, 2017 7:25 pm

The example is there but when I run it with "sudo python Adafruit_BME280_Example.py" there is an IOError: [Errno 110] connection timed out. The BME280 is detected as 0x68 when I use "i2cdetect -y -r 2". It's there and hopefully I did correct wiring. Here is a photo of what happened when I tried to run the example. This is most likely a user error on my part. Just can't figure out what I did wrong. Was able to get the DS3231 RTC working, thank you drewfustini!! And thank you bebo for your helping with this. I really appreciate your time and assistance.
Here is the pic, my apologies for resolution.
Attachments
DSC_0791.JPG
DSC_0791.JPG (134.13 KiB) Viewed 1237 times

trentroc
 
Posts: 46
Joined: Wed Nov 23, 2016 11:11 am

Re: BME280 on BeagleBone Black Wireless

by bebo on Wed Apr 12, 2017 10:35 pm

I wish I had something more constructive to offer, but I don't. I hooked up my BME280 the same as you and it works just fine. Have you tried it without the other sensor on the I2C bus? I remember getting the IO error with a different sensor on I2C, but I just hadn't hooked it up. It's as if the sensor isn't fully connected, but alas I am a novice when it comes to this stuff. What is in your /usr/local/lib/python2.7/dist-packages directory? Mine looks like this:
Code: Select all | TOGGLE FULL SIZE
devo@arm:/usr/local/lib/python2.7/dist-packages$ ls
Adafruit_BBIO                        Adafruit_I2C.pyc                  easy-install.pth                 pyserial-3.3-py2.7.egg-info     setuptools-3.3-py2.7.egg
Adafruit_BBIO-0.0.19-py2.7.egg-info  Adafruit_MCP9808-1.5.3-py2.7.egg  googlemaps                       requests                        setuptools-3.5.1-py2.7.egg
Adafruit_GPIO-1.0.3-py2.7.egg        Adafruit_PureIO-0.2.1-py2.7.egg   googlemaps-2.4.6-py2.7.egg-info  requests-2.11.1-py2.7.egg-info  setuptools.pth
Adafruit_I2C.py                      distribute-0.7.3-py2.7.egg        overlays                         serial                          spidev-3.2-py2.7-linux-armv7l.egg

bebo
 
Posts: 92
Joined: Tue Mar 29, 2011 8:22 am

Re: BME280 on BeagleBone Black Wireless

by bebo on Wed Apr 12, 2017 11:20 pm

I just put a third I2C device on the bus and got an identical error message
Code: Select all | TOGGLE FULL SIZE
Traceback (most recent call last):
  File "Adafruit_BME280_Example_F.py", line 3, in <module>
    sensor = BME280(mode=BME280_OSAMPLE_8)
  File "/home/devo/Python/python_files/Adafruit_Python_BME280/Adafruit_BME280.py", line 90, in __init__
    self._load_calibration()
  File "/home/devo/Python/python_files/Adafruit_Python_BME280/Adafruit_BME280.py", line 96, in _load_calibration
    self.dig_T1 = self._device.readU16LE(BME280_REGISTER_DIG_T1)
  File "build/bdist.linux-armv7l/egg/Adafruit_GPIO/I2C.py", line 185, in readU16LE
  File "build/bdist.linux-armv7l/egg/Adafruit_GPIO/I2C.py", line 164, in readU16
  File "build/bdist.linux-armv7l/egg/Adafruit_PureIO/smbus.py", line 173, in read_word_data
IOError: [Errno 110] Connection timed out

Ironically, it was the addition of the DS3231 RTC breakout that did it.

bebo
 
Posts: 92
Joined: Tue Mar 29, 2011 8:22 am

Re: BME280 on BeagleBone Black Wireless

by drewfustini on Thu Apr 13, 2017 3:37 am

NinjaTrent: Please try disconnecting the DS3231 RTC board and running the Adafruit_BME280_Example.py again. This would determine whether or not you are having the same experience as Bebo.

Also, please paste the output of these commands:

uname -a
cat /etc/debian_version
cat /etc/dogtag


I believe I have both the RTC board and the BME280 board, so I will try reproducing the issue.

drewfustini
 
Posts: 944
Joined: Sat Dec 26, 2015 1:19 pm

Please be positive and constructive with your questions and comments.