• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Error using BMP280?

Q&A Forum › Category: ESP32 › Error using BMP280?
0 Vote Up Vote Down
Dan Wolfson asked 3 months ago

Hi, 
Was playing with ESP32 and BMP280 using the examples from the MicroPython programming book – getting some errors in the BME280.py module..I am wondering if this is because I am using the BMP280 rather than BME280? Or is it something else?

>>> from machine import Pin, SoftI2C
>>> i2c = SoftI2C(scl=Pin(22), sda=Pin(21))
>>> bme= BME280.BME280(i2c=i2c)
Traceback (most recent call last):
File “<stdin>”, line 1, in <module>
File “BME280.py”, line 155, in __init__
File “BME280.py”, line 161, in _load_calibration
File “BME280.py”, line 121, in readU16LE
File “BME280.py”, line 104, in readU16
OSError: [Errno 19] ENODEV

1 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 3 months ago

Hi.
It’s probably because of the module.
They are different and probably have difference I2C addresses.
I recommend using a specific library for your sensor like this one for example: https://github.com/dafvid/micropython-bmp280
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] SMART HOME with RPi, ESP32, and ESP8266 (version 1.2) March 8, 2023
  • [eBook Updated] ESP32-CAM Projects (version 1.3) January 7, 2023

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2023 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.