Wiring the Sensirion SHT15

This example code is said to be for the SHT10, but I think it should work for both. I've used the other examples out there, and have been met with the same results. I will attach them as well. I should also mention that I have edited some functions and variable names in the .cpp and .h source files. Instead of temperature, there is temp_c_indoor; getTemp is now calcTempC; calcDewpoint is now calcDewpointC. I also added the variable temp_f_indoor, and the functions calcTempF and calcDewpintF. I'll attach them here as well, and follow up with a picture of the circuit.

The images should illustrate that I have set this up as indicated in the datasheet for the SHT15.

/*

  • Query a SHT10 temperature and humidity sensor
  • A simple example that queries the sensor every 5 seconds
  • and communicates the result over a serial connection.
  • Error handling is omitted in this example.
    */

#include <Sensirion.h>

const uint8_t dataPin = 2;
const uint8_t clockPin = 3;

float temp_c_indoor;
float humidity;
float dewpoint_c;

Sensirion tempSensor = Sensirion(dataPin, clockPin);

void setup()
{
Serial.begin(57600);
}

void loop()
{
tempSensor.measure(&temp_c_indoor, &humidity, &dewpoint_c);

Serial.print("Temperature: ");
Serial.print(temp_c_indoor);
Serial.print(" C, Humidity: ");
Serial.print(humidity);
Serial.print(" %, Dewpoint: ");
Serial.print(dewpoint_c);
Serial.println(" C");

delay(5000);
}

NonBlocking2.ino (6.49 KB)

SimpleSensirion.pde (791 Bytes)

Sensirion.cpp (13.8 KB)

Sensirion.h (3.25 KB)