Here is my sketch:
/****************************************************************
* ReadSHT2x
* An example sketch that reads the sensor and prints the
* relative humidity to the PC's serial port
*
* Tested with:
* - SHT21-Breakout Humidity sensor from Modern Device
* - SHT2x-Breakout Humidity sensor from MisensO Electronics
***************************************************************/
#include <Wire.h>
#include <SHT2x.h>
void setup()
{
Serial.begin(115200);
delay(5000);
Serial.println("Starting Wire...");
Wire.begin(2, 0);
}
void loop()
{
Serial.print("Humidity(%RH): ");
Serial.print(SHT2x.GetHumidity());
Serial.print(" Temperature(C): ");
Serial.println(SHT2x.GetTemperature());
delay(1000);
}
And here is the output:
Starting Wire...
Humidity(%RH): 118.99 Temperature(C):
ets Jan 8 2013,rst cause:4, boot mode:(3,0)
wdt reset
load 0x40100000, len 28780, room 16
tail 12
chksum 0x50
ho 0 tail 12 room 4
load 0x3ffe8000, len 1332, room 12
tail 8
chksum 0x06
load 0x3ffe8540, len 1700, room 0
tail 4
chksum 0x1d
csum 0x1d
The humidity value is clearly nonsense. The after the "Temperature(C):" appears, there is a pause of around 1s before the rest of that error message appears.
Thanks,
Paul