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

  • 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...


  • 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

  • @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.

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

  • 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 :-)

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

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

  • @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.