🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    [Solved]M5StickC I2C bus error

    Scheduled Pinned Locked Moved UIFlow
    5 Posts 2 Posters 11.8k Views 1 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.
    • C Offline
      csqrd
      last edited by m5-docs

      While using the M5StickC with the ENV "environment sensor" connected I receive the following error when running the ENV sample UICode program (https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Unit/ENV/UIFlo):

      >>> env0 = units.ENV(units.PORTA)
      Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "m5flow/units.py", line 83, in init
      File "lib/bmp280.py", line 147, in init
      OSError: I2C bus error (6)

      I tried a second ENV sensor and received the same error. Any suggestions would be appreciated.

      1 Reply Last reply Reply Quote 0
      • H Offline
        heybin
        last edited by

        0_1555552359157_02cec498-7d5a-4e29-a25a-2b5dfd62779a-image.png

        check if the grove port is in proper contact :)

        1 Reply Last reply Reply Quote 0
        • C Offline
          csqrd
          last edited by

          Thanks for the response. I replaced the grove cable with another grove cable and made sure it was fully seated and still got an error.

          >>> import units
          >>> a = units.E
          Traceback (most recent call last):
          File "<stdin>", line 1, in <module>
          AttributeError: 'module' object has no attribute 'E'

          >>> a = units.ENV(units.P)
          Traceback (most recent call last):
          File "<stdin>", line 1, in <module>
          AttributeError: 'module' object has no attribute 'P'

          >>> a = units.ENV(units.PORTA)
          >>>

          Tried this as well:
          >>> from machine import I2C
          >>> i2c = I2C(freq=400000, sda=21, scl=22)
          >>> Traceback (most recent call last):
          File "boot.py", line 29, in reboot
          File "m5flow/hardware/axp192.py", line 96, in btnState
          File "m5flow/hardware/axp192.py", line 103, in _regChar
          OSError: I2C bus error (6)

          >>> i2c.scan()
          [52, 81, 108]
          >>> Traceback (most recent call last):
          File "boot.py", line 29, in reboot
          File "m5flow/hardware/axp192.py", line 96, in btnState
          File "m5flow/hardware/axp192.py", line 103, in _regChar
          OSError: I2C bus error (6)

          1 Reply Last reply Reply Quote 0
          • H Offline
            heybin
            last edited by

            0_1555556974669_dc7406be-8ad0-4191-821c-9002af3328ed-image.png
            It mean env init well, you can try a.temperature() and a.pressure() and a.humidity() to get msg

            1 Reply Last reply Reply Quote 0
            • H Offline
              heybin
              last edited by

              StickC grove IIC not 21, 22, it`s 32, 33

              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
              • First post
                Last post