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

    I2c failure with MPU6050 component

    Scheduled Pinned Locked Moved Arduino
    arduino
    2 Posts 1 Posters 1.8k Views
    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.
    • G Offline
      Grandpa-G
      last edited by

      I am using a simple Arduino sketch to get values from the MPU6050 over I2C. The only values I receive are 0. Also, I cannot write to any register. The I2C scanner shows it is connected.

      If I use an Arduino Mega2560, the device works correctly.

      I have also tried to use a M5Stack MPU6886 and it fails as well.

      I am using a M5Stack Basic.

      G 1 Reply Last reply Reply Quote 0
      • G Offline
        Grandpa-G @Grandpa-G
        last edited by

        More information

        If I use M5Unified.h and then a begin of M5.begin(), the data is all zeros. If I take out the begin, then the data is correct. There must be something in the M5Unified that is restarting the Wire or taking over the I2C bus.

        How can I correct this. It is a show stopper. If I can find a solution, then I will have to discard the M5Stack basic and go to a regular ESP32.

        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