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

Wire.begin() is not called if ESP8266 is not defined #66

Open hady-sarhan opened 1 year ago

hady-sarhan commented 1 year ago

Code snippet below is from Line 250 of MCP7940.cpp. Both #if and #elif conditions are the same. Wire.begin() never gets called. if ESP8266 is not defined.


#if defined(ESP8266)
  Wire.begin(sda, scl);  // Start I2C as master device using the specified SDA and SCL
#elif defined(ESP8266)
  Wire.begin();  // Start I2C as master device
#endif

Changing `#elif defined(ESP8266)` to `#else` solves the issue.

  - Library Version: 1.2.0
  - Testing on Arduino Due