SHT10 wont work with RTC library or wire.h


In the code I pasted below I did not plug the RTC unit yet, however just by enabling either the Wire.h or SPI.h or Sodaq_DS3231.h library the SHT10 stops giving me values. Basically what I get is -4 and -40. The sensor works fine without using the RTC library how can I find what is causing this?

I tried the Makuna library for RTC3231 too and I think anything with #include <Wire.h> is causing problems with the SHT1x.h library at least on my system?

#include <SPI.h>
#include <Wire.h> //DS3231 

#include <Sodaq_DS3231.h>
char weekDay[][4] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
//DateTime SetDateTo(2016, 3, 30, 20, 15, 10, 3); //see rtc.setDateTime(SetDateTo in setup

int OutsideHumiditySensorValue;
int OutsideTempSensorValue;

#include <SHT1x.h>
#define dataPinSHT  20
#define clockPinSHT 21
SHT1x sht1x(dataPinSHT, clockPinSHT);

void setup()   { ///-----------------------------------SETUP

Serial1.begin(4800); //9600bps is default for OpenLog

// rtc.setDateTime(SetDateTo); //Adjust date-time as defined 'dt' above  

} ///---------------------------------SETUP---------------------------

void loop() { //--------------------------------------------LOOP:

DateTime now =;

Serial.print(now.hour(), DEC);
Serial.print(now.minute(), DEC);
Serial.print(now.second(), DEC);

OutsideHumiditySensorValue =  sht1x.readHumidity();
OutsideTempSensorValue = sht1x.readTemperatureC();

} // -----------------------------------------LOOP----------------------------

I apologize i found the solution by chance soon after I posted the question.


The SHT1x is not true I2C. Putting it and a real I2C on the same pins means the 2 drivers will conflict with each other.

If I just plugged the SHT10 into any digital pins other than the I2C pins of the arduino board, things are fine.