Adafruit IO Environmental Monitor by Brent Rubell

Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
Locked
User avatar
Tom_Henry
 
Posts: 350
Joined: Wed Aug 26, 2020 8:19 pm

Adafruit IO Environmental Monitor by Brent Rubell

Post by Tom_Henry »

I am working on the Adafruit IO Environmental Monitor for Feather or Raspberry Pi project by Brent Rubell.

I have set up my Raspberry Pi 4 with CircuitPython and have connected the 3 sensors in this project.

I am running the Project Bundle code from that project. I just added one print statement for trouble shooting. See attached.

I am getting an i2C error for the bme280 sensor.

Here is the running code using Thonny.

I don’t know how to fix the Attribute Error.

Tom Henry


>>> %Run environmental_monitor.py

Tom Henry

Traceback (most recent call last):

File "/home/pi/environmental_monitor.py", line 83, in <module>
bme280 = adafruit_bme280.Adafruit_BME280_I2C(i2c)

AttributeError: module 'adafruit_bme280' has no attribute 'Adafruit_BME280_I2C'

>>>
Attachments
environmental_monitor.py
(4.2 KiB) Downloaded 6 times

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: Adafruit IO Environmental Monitor by Brent Rubell

Post by mikeysklar »

The line that it is erroring out on looks correct. I do see in our example code we are importing the library differently.

Code: Select all

from adafruit_bme280 import basic as adafruit_bme280
https://learn.adafruit.com/adafruit-bme ... 2995300-27

User avatar
Tom_Henry
 
Posts: 350
Joined: Wed Aug 26, 2020 8:19 pm

Re: Adafruit IO Environmental Monitor by Brent Rubell

Post by Tom_Henry »

mikeskyler

I changed the import of the bme280 sensor from: import adafruit_bme280

to: from adafruit_bme280 import basic as adafruit_bme280

and that fixed it.

Thank you,

Tom Henry

User avatar
Tom_Henry
 
Posts: 350
Joined: Wed Aug 26, 2020 8:19 pm

Re: Adafruit IO Environmental Monitor by Brent Rubell

Post by Tom_Henry »

Here is what my Dashboard looks like coming from Brent Rubell's Adafruit IO Environmental Monitor for Raspberry PI.
Attachments
Environmental Monitor.png
Environmental Monitor.png (190.71 KiB) Viewed 155 times

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: Adafruit IO Environmental Monitor by Brent Rubell

Post by mikeysklar »

Thanks for sharing the screenshot that looks great.

Locked
Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.

Return to “Internet of Things: Adafruit IO and Wippersnapper”