unable to connect to CO2L unit
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.
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?
Have you updated to the Latest firmware for the Core2?
@m5stack I'm getting error 19 with latest UIFLow (1) firmware.
I think so: I installed the v1.12.3
I just checked and yes I agree that there is an issue with UIFlow.
mtylerjr 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)
teastain last edited by
@mtylerjr It likely works in Arduino IDE.
csierra67 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 2
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.
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.