Zanduino / MCP7940

Arduino Library to access the MCP7940M, MCP7940N and MCP7940x Real-Time chips
GNU General Public License v3.0
35 stars 22 forks source link

RPI2040 using Wire1 instead of Wire #64

Open wsandor opened 1 year ago

wsandor commented 1 year ago

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.