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

    CoreS3 and ENV Pro (BME688)

    Scheduled Pinned Locked Moved PRODUCTS
    7 Posts 3 Posters 4.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.
    • A Offline
      aitech
      last edited by

      Hi

      I am trying to get an S3Core to read from an ENV Pro (BME688) but without success, I am suspecting either incompatibility or a dead sensor, it seems to be behaving like it is dead, it works the same when plugged in as not plugged in. Or is there something I need to switch on?

      Method1
      Firstly using Arduino I have used the code from https://github.com/m5stack/M5Unit-ENV/blob/master/examples/ENV_PRO/ENV_PRO.ino but am unable to get past line 57

       if (!envSensor.begin(BME68X_I2C_ADDR_HIGH, Wire)) {
              checkBsecStatus(envSensor);
          }
      

      I have put some debug in and it just hits this and hangs on the serial output, if I take out this code then it carries on but obviously errors. I tried changing '_HIGH' to '_LOW' but it made no difference.

      Method2
      I loaded https://github.com/adafruit/Adafruit_BME680/blob/master/examples/bme680test/bme680test.ino

      I can't get it to go past line 39

      if (!bme.begin()) {
          Serial.println("Could not find a valid BME680 sensor, check wiring!");
          while (1);
        }
      

      It just displays the error message and hangs.

      Thanks

      Jon

      felmueF 1 Reply Last reply Reply Quote 0
      • felmueF Offline
        felmue @aitech
        last edited by

        Hello @aitech

        did you adjust SDA and SCL accordingly? The example is for M5Core which uses different GPIOs on port A (red) than M5CoreS3.

        Try changing this line:

        Wire.begin(21, 22);
        

        to

        Wire.begin(2, 1);
        

        You can also try the I2C scanner (internal and port A) from here.

        Thanks
        Felix

        GPIO translation table M5Stack / M5Core2
        Information about various M5Stack products.
        Code examples

        A 2 Replies Last reply Reply Quote 1
        • A Offline
          aitech @felmue
          last edited by

          Hello @felmue

          Many thanks, yes I did have the wrong settings for SDA and SCL, I have now corrected them and am getting more output as below, but am getting error code -2, and then its rebooting.

          Am investigating further.......

          '''
          BME68X error code : -2
          Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.

          Core 1 register dump:
          PC : 0x40056f5c PS : 0x00060630 A0 : 0x82016254 A1 : 0x3fceb8e0
          A2 : 0x3fceb8f0 A3 : 0x000009b0 A4 : 0x0000002e A5 : 0x3fceb8f0
          A6 : 0x00060023 A7 : 0x00000002 A8 : 0x00000000 A9 : 0x00060023
          A10 : 0x00060023 A11 : 0x00000001 A12 : 0x8037dbfd A13 : 0x3fc93bf0
          A14 : 0x00060023 A15 : 0x00000003 SAR : 0x0000001e EXCCAUSE: 0x0000001c
          EXCVADDR: 0x000009b0 LBEG : 0x40056f5c LEND : 0x40056f72 LCOUNT : 0x00000001

          Backtrace: 0x40056f59:0x3fceb8e0 |<-CORRUPTED

          ELF file SHA256: a0a73cde460324f4
          '''

          Thanks for the link to the scanner I will try that as well.

          1 Reply Last reply Reply Quote 0
          • A Offline
            aitech @felmue
            last edited by

            @felmue

            Nothing showing on the scanner, so looks like a dead sensor.

            Thanks

            felmueF LuftwaffleL 2 Replies Last reply Reply Quote 0
            • felmueF Offline
              felmue @aitech
              last edited by

              Hello @aitech

              have you double-checked that port A actually has power? You'll need a multimeter for that and measure between black (GND) and red (5 V) wires.

              Thanks
              Felix

              GPIO translation table M5Stack / M5Core2
              Information about various M5Stack products.
              Code examples

              A 1 Reply Last reply Reply Quote 0
              • A Offline
                aitech @felmue
                last edited by

                @felmue

                Yes, its showing 4.83V, so should be good

                Thanks

                Jon

                1 Reply Last reply Reply Quote 0
                • LuftwaffleL Offline
                  Luftwaffle @aitech
                  last edited by

                  @aitech Dont' throw that sensor away yet.
                  There is an error in the ENV_Pro demo code:
                  Line 51 should read Wire.begin();
                  After changing that it worked fine for me.
                  The interface address for the sensor is actually defined on line 57.
                  Pretty impressive sensor.

                  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