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

    unable to connect to CO2L unit

    Units
    co2l
    5
    11
    5.1k
    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
      delaere
      last edited by

      Hi,

      I am new to M5Stack and started to play with small things to learn. After playing with basic UI controls (which works great), I wanted to use some external sensor and connected my CO2L unit to port A.

      My current setup is thus made of a CORE2 connected to a CO2L unit, and I am using uiflow.

      0_1692889775167_Screenshot_20230824_170417.png

      I reduced the test progam to the bare minimum: I declared the CO2L unit and left everything else empty. This results in the following micropython code:

      from m5stack import *
      from m5stack_ui import *
      from uiflow import *
      import unit
      
      
      screen = M5Screen()
      screen.clean_screen()
      screen.set_screen_bg_color(0xFFFFFF)
      co2l_1 = unit.get(unit.CO2_SCD41, unit.PORTA)
      

      So, I am stuck with a "CO2 unit maybe not connect" error message as if nothing was connected. Am I doing something wrong, or is the sensor faulty (I just received it)?
      Is there any way to debug?

      Thanks!

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

        Have you updated to the Latest firmware for the Core2?

        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
        • ajb2k3A
          ajb2k3
          last edited by

          @m5stack I'm getting error 19 with latest UIFLow (1) firmware.

          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
            delaere
            last edited by

            I think so: I installed the v1.12.3

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

              I just checked and yes I agree that there is an issue with UIFlow.

              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!

              M 1 Reply Last reply Reply Quote 0
              • M
                mtylerjr @ajb2k3
                last edited by mtylerjr

                I am placing another order tomorrow, and this is one of the units I was intending to add.

                Does the slightly less pro version of this (the non-L version) have the same issue? Anyone know?

                (and I realize the issue is almost certainly in the interface/UIFlow/libraries and not the unit itself)

                teastainT C 2 Replies Last reply Reply Quote 0
                • teastainT
                  teastain @mtylerjr
                  last edited by

                  @mtylerjr It likely works in Arduino IDE.

                  Cheers, Terry!

                  100% M5Stack addict with several drawers full of product!

                  1 Reply Last reply Reply Quote 0
                  • C
                    csierra67 @mtylerjr
                    last edited by

                    @mtylerjr Just tested the M5 demo example with my CO2 unit.. I don't have the L version, actually was not aware of its existence.
                    After a first run the sketch reported errors, the demo program uses Ubuntu font that does not exist on Core 2 UIFlow 1.12.3... I replaced all the labels fonts by default and yes the sensor works on Core 20_1692954046604_CO2sensor.jpg

                    1 Reply Last reply Reply Quote 1
                    • D
                      delaere
                      last edited by

                      Thanks for checking!
                      I will be happy to make any additional test with my unit. It may be worth noting that on my first attempt (reproducing the example with default fonts just as @mtylerjr) I got the serial number (and nothing else) but that it was not reproducible: I got the error immediately after that first attempt.

                      I can try to look with arduino UI, but I have no experience there, so it is likely to take some time.

                      In the meanwhile, I repeated the test with an ATOM Lite for the same result.

                      P.S.: I tried accessing the UNIT with bare I2C without success, but I have no working example to confirm that I am using the I2C blocks properly.

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

                        I managed to get the Arduino UI running with the CORE2 (using the M5Unified 0.1.9 and the Sensirion I2C SCD4X 0.4.4 libraries).

                        I took the example ino file and modified the header to use M5Unified.h instead of M5stack.h... and the problem seems to be there as well.

                        The first call to scd4x.stopPeriodicMeasurement() returns an error saying: Error writing to I2C bus. Then it hangs apparently on the subsequent scd4x.startPeriodicMeasurement() call, for what I can say.

                        1 Reply Last reply Reply Quote 1
                        • D
                          delaere
                          last edited by

                          To close this topic: I have no problem with a newly ordered sensor. I was apparently unlucky enough that my first sensor was faulty.

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