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

    Thermal unit MLX90640 with Core2

    Scheduled Pinned Locked Moved Modules
    9 Posts 7 Posters 15.5k Views 2 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.
    • H Offline
      Hexyl
      last edited by

      Hello,

      I have obtained a Core2 with a thermal unit (MLX90640). The example code for the thermal unit does not work on the Core2. Also, in UiFlow there is no option to add the thermal unit with the "+" icon. However if I start UiFlow and select the classic Core, it is possible to add the thermal unit.

      Is the themal unit not compatible with the Core2?

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

        Hello @Hexyl

        most modules, units and their associated examples have been developed before M5Core2 was available and therefore often do not just work out of the box. It is a pity that the M5Stack engineers do not (can not) spare more time to adapt / fix the existing examples from M5Stack to M5Core2.

        That said, the issue you are facing is that in M5Stack port A uses GPIO21 / GPIO22 (same as the internal I2C bus). In M5Core2 that has changed and only the internal I2C bus uses GPIO21 and GPIO22, however the external I2C bus on port A uses GPIO32 and GPIO33.

        In the Thermal unit example try replacing these lines:

          M5.begin();
          M5.Power.begin();
          Wire.begin();
        

        with

          M5.begin(true, false, true, true);
        

        the last true enables the external I2C bus on GPIO32 and GPIO33.

        Hope this helps.

        Re UIFlow: I have no idea as to if and when the thermal camera will be supported. That is another question for the M5Stack engineers.

        Thanks
        Felix

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

        1 Reply Last reply Reply Quote 0
        • B Offline
          Broder
          last edited by

          I just finished to adopt the example at https://github.com/m5stack/M5Stack/blob/master/examples/Unit/THERMAL_MLX90640/THERMAL_MLX90640.ino
          in Arduino IDE to Core2 and it works fine. If you are interested I can share the code.

          L K H R 4 Replies Last reply Reply Quote 0
          • L Offline
            LeoZeLion @Broder
            last edited by

            @broder Hello !
            Yes, good stuff !! i'm interested by your Core2 version of the Thermal_LMX90640.ino !!
            Can you give me a link where I can download it please?

            Thx !

            1 Reply Last reply Reply Quote 1
            • K Offline
              kareemtawab @Broder
              last edited by

              @broder Hi

              I got the Core2 without knowing that it might not work with the sensor. So, I'm quite in need of a copy of that port too!

              1 Reply Last reply Reply Quote 0
              • K Offline
                kareemtawab
                last edited by

                Bump. No one?

                1 Reply Last reply Reply Quote 0
                • H Offline
                  Hexyl @Broder
                  last edited by

                  @broder
                  It would be great if you could share the code!

                  1 Reply Last reply Reply Quote 0
                  • R Offline
                    rhyde @Broder
                    last edited by

                    @broder Do you still have a pointer to that code? I was just looking at doing that, but if someone already did it, I would prefer to start from a working example]

                    W 1 Reply Last reply Reply Quote 0
                    • W Offline
                      wsanders @rhyde
                      last edited by wsanders

                      Bump. Me too! I can't find an M5 copy of MLX90640_API.cpp and MLX90640_I2C_Driver.cpp. After commenting out calls to MLX90640_BadPixelsCorrection() I tried using Sparkfun's version, but the .ino file has calls to interpolate_image() and get_point() which the Sparkfun library does not have.

                      I tried using Blockly but the data returned by the calls to unit.get(unit.THERMAL, unit.PORTA) objects return garbage data. Well, not quite garbage - it's data but it is not corrected and interleaved in a way I can figure out.

                      Micropython might be a better bet but I don't know how to get the Unit libraries. I don't have a spare Arduino to test on either.

                      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