I've tried your library on RPI2040. RPI2040 has 2pc of 2wire interfaces, and unfortunately the MCP7940 is connected to the i2c1 (Wire1) interface on my board, so it won't worked as Wire is hard wired in the library.
I've modified the code to be able to use Wire1 also. Now it can be set as an optional parameter to the MCP7940_Class constructor: MCP7940_Class MCP7940(&Wire1); // Create an instance of the MCP7940
Here are my modified files, include them in the next version if you find it useful:
MCP7940.cpp.txtMCP7940.h.txt
One more problem:
It could be some configuration problem, but for some reason PlatformIO sees only and downloads version 1.2.0 of the library instead of the newest one.
Hi,
I've tried your library on RPI2040. RPI2040 has 2pc of 2wire interfaces, and unfortunately the MCP7940 is connected to the i2c1 (Wire1) interface on my board, so it won't worked as Wire is hard wired in the library. I've modified the code to be able to use Wire1 also. Now it can be set as an optional parameter to the MCP7940_Class constructor:
MCP7940_Class MCP7940(&Wire1); // Create an instance of the MCP7940
Here are my modified files, include them in the next version if you find it useful: MCP7940.cpp.txt MCP7940.h.txt
One more problem: It could be some configuration problem, but for some reason PlatformIO sees only and downloads version 1.2.0 of the library instead of the newest one.