Thermal unit MLX90640 with Core2
-
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?
-
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