SHT10 with Arduino always shows values -40°C, -40°F and -4.65%

Hello,
I ordered sensor from this
my wiring red => 5V blue => GND dataPin => 10 clockPin => 11
I use this library https://github.com/practicalarduino/SHT1x
and use example I didn't change any thing

/**
 * ReadSHT1xValues
 *
 * Read temperature and humidity values from an SHT1x-series (SHT10,
 * SHT11, SHT15) sensor.
 *
 * Copyright 2009 Jonathan Oxer <jon@oxer.com.au>
 * www.practicalarduino.com
 */

#include <SHT1x.h>

// Specify data and clock connections and instantiate SHT1x object
#define dataPin  10
#define clockPin 11
SHT1x sht1x(dataPin, clockPin);

void setup()
{
   Serial.begin(38400); // Open serial connection to report values to host
   Serial.println("Starting up");
}

void loop()
{
  float temp_c;
  float temp_f;
  float humidity;

  // Read values from the sensor
  temp_c = sht1x.readTemperatureC();
  temp_f = sht1x.readTemperatureF();
  humidity = sht1x.readHumidity();

  // Print the values to the serial port
  Serial.print("Temperature: ");
  Serial.print(temp_c, DEC);
  Serial.print("C / ");
  Serial.print(temp_f, DEC);
  Serial.print("F. Humidity: ");
  Serial.print(humidity);
  Serial.println("%");


  delay(2000);
}

but output always shows values -40°C, -40°F and -4.65%
output

pls help,
thx

The library page on Github says "A value of -40 is returned in the event of a communication error with the sensor."

Triple check your wiring. Post a photo.

Also, maybe try a more up-to-date library. The one you're using is old and there are a number of unresolved "issues" (which may or may not be applicable to your problem.)

How did you know the wiring colors? On the linked page there's absolutely no documentation.

I found an Adafruit document showing a similar device but that has a different coloring scheme for the wires.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.