Thermocouple reading works on old library but not new library

Hi, I am having some trouble with reading thermocouples (outputs NAN) when connected to my Arduino Portenta Machine Control board while using the new library: GitHub - arduino-libraries/Arduino_PortentaMachineControl: The official, revamped Arduino Library for the Portenta Machine Control.
but thermocouple is working fine when using old library:
GitHub - arduino-libraries/Arduino_MachineControl

I have checked that thermocouple is working fine and connections are correct. Just wondering why the old library works but not the new one.

I am using Visual Studio Code with PlatformIO IDE extension.


yes, I saw that too but they mentioned that they don’t support PlatformIO IDE. Many people faced the same issue but there is no solution yet. I wanted to know if the issue is being that the Arduino IDE requires user to download the Arduino Mbed OS Portenta Board, but PlatformIO doesn’t have such option unless I am missing something. But if I am able to use the old library with no issue, there should not be any problems with the software I am using. cmiiw

Also is framework-arduino-mbed @4.1.3 same as the Arduino Mbed OS Portenta Board 4.1.3?

Yes. It’s the version of

I think they’re trying to cheap out of support. Does the same sketch fail in the Arduino IDE with the latest version of Arduino Mbed OS Portenta Boards installed (4.1.3) and the exact same library version? If yes, then it’s a problem in the library, if no, it’s a problem in PlatformIO.

I personally have not tried it on Arduino IDE with Arduino Mbed OS Portenta Board 4.1.3 and the library, but someone else has tried and it works for them using Arduino IDE. But if using PlatformIO IDE, the old library works but not the new library version.

But they could be using a different circuit or board, or have some other minute difference. I would really need you to test it in the Arduino IDE to fully confirm with the exact same hardware.