Confusion with wire / wire1 in SHT3x.cpp
In file SHT3x.cpp it seems that there is some mixture of using wire and wire1. Wire1 has not been defined.
I have the same problem. It seems, that ESP8266 does not have "Wire1", but ESP32 does. So perhaps this library does not support ESP8266 any more. I also believe, that "Wire1" and "Wire"-code is the same. So perhaps a line #define Wire1 Wire might help.
#define Wire1 Wire
fixed that issue.
Hello in which file did you #define Wire1 Wire? I tried in SHT3x.h, or SHT3x.cpp or in my sketch but instead of Wire is not defined I get the error: C:\Users\PC desktop Gilles\Documents\Arduino\libraries\SHT3x-master\SHT3x.cpp: In member function 'void SHT3x::Begin(int, int)': C:\Users\PC bureau Gilles\Documents\Arduino\libraries\SHT3x-master\SHT3x.cpp:16:27: error: no matching function for call to 'TwoWire::begin(int&, int&)' else Wire1.begin(SDA, SCL);
Impossible for the moment to use the SHT3x-master library even with the examples provided, the compilation gives the following error: C:\Users\PC desktop Gilles\Documents\Arduino\libraries\SHT3x-master\SHT3x.cpp: In member function 'void SHT3x::Begin(int, int)': C:\Users\PC bureau Gilles\Documents\Arduino\libraries\SHT3x-master\SHT3x.cpp:16:7: error: 'Wire1' was not declared in this scope else Wire1.begin(SDA, SCL); ^~~~~
I'm trying on an Arduino Uno! Thanks
By deleting in the file SHT3x.cpp all the program blocks calling on WIRE1 it works but it is not too clean if each time it is necessary to modify this library... Is it due to an update of the wire library? Which is no longer compatible with SHT3x.master? Should a new version be needed? Thanks