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

    [Solved] ENV Hat on M5Stick-C not working at all

    Modules
    4
    8
    16.8k
    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
      dda
      last edited by dda

      Hi,

      I am trying out the M5Stick-C with an ENV hat, and the Arduino IDE ENV.ino sketch isn't working. Says it can't find the BME and BMM. Humidity data from DHT12 is also wrong (0%).

      So I ran an I2C scanner sketch, and I get 3 devices on the bus (that's good!) but the addresses are plain wrong – or anomalous, if you will...

      It lists devices on 0x34, 0x51 and 0x6C... Not exactly what one would expect... Has anyone seen anything like that? I'm thinking the ENV hat is fubared...

      TIA

      1 Reply Last reply Reply Quote 0
      • W
        wikistik
        last edited by

        I just tried the ENV hat on a M5StiickC with the default Arduino sketch and it appears to be working fine. It's putting out temp, humidity, compass, and pressure readings that all make sense. Make sure you have all the required libraries installed, especially the Adafruit BMP280 library
        https://github.com/adafruit/Adafruit_BMP280_Library.

        D 1 Reply Last reply Reply Quote 0
        • D
          dda @wikistik
          last edited by

          @wikistik been there done that. I have everything needed.

          As I said the I2C addresses listed by the I2C scanner are plain odd, which makes me think that the ENV hat (or the SickC) is defective. Which is why I was asking whether anyone had a similar experience.

          1 Reply Last reply Reply Quote 0
          • ajb2k3A
            ajb2k3
            last edited by

            I can't really help here as I use UIFlow and have all but the compass working on my stick c.

            UIFlow, so easy an adult can learn it!
            If I don't know it, be patient!
            I've ether not learned it or am too drunk to remember it!
            Author of the WIP UIFlow Handbook!
            M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

            1 Reply Last reply Reply Quote 0
            • D
              dda
              last edited by

              Alright so after discussing this with Jimmy, turns out the ENV hat uses Wire1, not Wire, so the I2C scanner was poking in the wrong place. After fixing a couple of issues in code, it is working. Case closed :-)

              W 1 Reply Last reply Reply Quote 1
              • W
                wessel @dda
                last edited by

                @dda could you explain what yoy changed because mine is not working to?

                1 Reply Last reply Reply Quote 0
                • D
                  dda
                  last edited by

                  In my code I was using Wire instead of Wire1... So by changing that it worked.

                  ajb2k3A 1 Reply Last reply Reply Quote 0
                  • ajb2k3A
                    ajb2k3 @dda
                    last edited by

                    @dda That would make sense now that I think about it as Wire is i2c0 which is routed to the grove port.

                    Thank you for taking the time to work it out and solve it.

                    BTW can you edit you title and put [Solved] at the beginning of the title to show that the issue is solved.

                    UIFlow, so easy an adult can learn it!
                    If I don't know it, be patient!
                    I've ether not learned it or am too drunk to remember it!
                    Author of the WIP UIFlow Handbook!
                    M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

                    1 Reply Last reply Reply Quote 1
                    • First post
                      Last post