Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Help with BME280 on Wipy 3.0 + Expansion Board 3.0

    Scheduled Pinned Locked Moved WiPy 2&3
    wipy 3.0expansion boardbme280i2c
    3 Posts 2 Posters 474 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D Offline
      Dezert754
      last edited by

      Hi there, so Im having some trouble with the BME 280. I have already tried the following bme280 libraries :

      https://bitbucket.org/oscarBravo/wipy_bme280(Currently using this)
      https://github.com/catdog2/mpy_bme280_esp8266 (Just because it worked on my pyboard).

      I keep running into the same issue every time. Using normal code in .py doesn't work period. So I tried to do a work around multiple ways with REPL based on what other people said about Lora and Wipy 2.0 however I keep running into the same issue:

      from machine import I2C
      >>> from bme280 import *
      >>> i2c = I2C()
      >>> bme280 = BME280(address=0x76, i2c=i2c)
      Traceback (most recent call last):
        File "<stdin>", line 1, in <module>
        File "bme280.py", line 149, in __init__
        File "bme280.py", line 155, in _load_calibration
        File "bme280.py", line 115, in readU16LE
        File "bme280.py", line 98, in readU16
      TypeError: function missing 1 required positional arguments
      

      or

      >>> from machine import I2C
      >>> import bme280
      >>> i2c = I2C(0, I2C.MASTER, baudrate=100000)
      >>> i2c.scan()
      [118]
      >>> bme = bme280.BME280(i2c=i2c)
      Traceback (most recent call last):
        File "<stdin>", line 1, in <module>
        File "bme280.py", line 149, in __init__
        File "bme280.py", line 155, in _load_calibration
        File "bme280.py", line 115, in readU16LE
        File "bme280.py", line 98, in readU16
      TypeError: function missing 1 required positional arguments
      

      Its always the same lines that are being the issue. But I know that the sensor works because I use it with my Pyboard. I am also running:
      Pycom MicroPython 1.18.0.r1 [v1.8.6-849-9569a73] on 2018-07-20; WiPy with ESP32

      Any help is greatly appreciated!

      robert-hhR 1 Reply Last reply Reply Quote 0
      • robert-hhR Offline
        robert-hh @Dezert754
        last edited by robert-hh

        @dezert754 You could try this one: https://github.com/robert-hh/BME280
        I adapted them from the Adafruit files to PyCom devices. There are two variants: bme280_float.py and bme280_int.py.
        The API is the same, just the internal calculation method differs, resulting very small differences between the variants (like 0.01%).

        D 1 Reply Last reply Reply Quote 1
        • D Offline
          Dezert754 @robert-hh
          last edited by

          @robert-hh Works like a charm, thank you so much!

          1 Reply Last reply Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • 1 / 1
          • First post
            Last post

          Pycom on Twitter

          Pycom