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

    ENVIII causes Core Basic to crash and restart continuously.

    Scheduled Pinned Locked Moved General
    3 Posts 3 Posters 3.1k 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.
    • teastainT Offline
      teastain
      last edited by teastain

      Arduino IDE 2.2.1
      ESP32 board def. ver. 2.0.13
      M5Stack board def. ver. 2.0.7
      M5Stack library ver 0.4.5
      M5_ENV ver. 0.0.8
      All recently updated.
      Sketch is the example from the Github repository:
      Unit_ENVIII_M5Core.ino
      When I comment out this:

      /*
          if (sht30.get() == 0) {  // Obtain the data of shT30.  获取sht30的数据
              tmp = sht30.cTemp;   // Store the temperature obtained from shT30.
                                   // 将sht30获取到的温度存储
              hum = sht30.humidity;  // Store the humidity obtained from the SHT30.
                                     // 将sht30获取到的湿度存储
          } else {
              tmp = 0, hum = 0;
          }
          */
      

      it does not crash, but of course it does not display the temperature!
      So...it points to the "sht30.get()" function.

      When I replace it with inline code:
      (and declare this: unsigned int data[6];)
      Wire.beginTransmission(0x44); //0x44 for M5Stack ENV (0x45 is DFRobot)
      Wire.write(0x2C); //show all the "wheels and gears"
      Wire.write(0x06);
      Wire.endTransmission();
      delay(50);
      Wire.requestFrom(0x44, 6);
      data[0] = Wire.read();
      data[1] = Wire.read();
      data[2] = Wire.read();
      data[3] = Wire.read();
      data[4] = Wire.read();
      data[5] = Wire.read();
      tmp = ((((data[0] * 256.0) + data[1]) * 175) / 65535.0) - 45;
      hum = ((((data[3] * 256.0) + data[4]) * 100) / 65535.0);

      The sensor works!

      Cheers, Terry!

      100% M5Stack addict with several drawers full of product!

      1 Reply Last reply Reply Quote 0
      • E Offline
        evvecz
        last edited by

        I has same problem. I solved it by adding sht30.init(); to the setup() function.

        SHT3X sht30;
        QMP6988 qmp6988;
        float tmp = 0.0;
        float hum = 0.0;
        float pressure = 0.0;

        void setup() {
        M5.begin();
        Wire.begin();
        sht30.init();
        qmp6988.init();
        }

        this is missing in the example

        1 Reply Last reply Reply Quote 0
        • G Offline
          gavin67890
          last edited by

          Same as?
          https://forum.m5stack.com/topic/5692/stickc-envii-hat-or-enviii-unit-reboots-constantly/3

          Atom LITE | Atom Matrix | StickC | CORE2 | Paper | ...

          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