{
// Read values from the sensor
tempC = sht15.readTemperatureC();
tempF = sht15.readTemperatureF();
humidity = sht15.readHumidity();
}
//
void printOut()
{
Serial.print(" Temp = ");
Serial.print(tempF);
Serial.print("F, ");
Serial.print(tempC);
Serial.println("C");
Serial.print(" Humidity = ");
Serial.print(humidity);
Serial.println("%");
}
Resources and Going Further
You should now have a good idea of how to add humidity and temperature
sensing into your next project. Need some inspiration? Check out these
other tutorials:
• Make an automated terrarium that manages heat and humidity
levels.
• Build a humidor control box that maintains a constant humidity in a
controlled space.
Resources:
• SHT15 Datasheet
• HTU21D Breakout Board Schematic
• HTU21D Breakout Board Eagle Files
• Github repo containing all the latest files and code
Page 7 of 7
10/8/2015
https://learn.sparkfun.com/tutorials/sht15-humidity-and-temperature-sensor-hookup-guide?...