}

New SHT20 Library with VPD and Dew Point Calculations

New SHT20 Library with VPD and Dew Point Calculations

Version 1.1.0

We just released a minor library update for the Air Temp/Humidity Sensor. The big change is the addition of a VPD and dew point calibration.

Vapor Pressure Deficit

In terms of growing plants, VPD is another measurement that helps you control the environment better. It tells you if the combined effects of temperature and humidity are in a good range, or if they are causing stress. There are a lot of good resources online, but to pick one, Argus Controls has written a good article about it.

Here's some code:

#include "uFire_SHT20.h"
uFire_SHT20 sht20;

void setup()
{
  Serial.begin(9600);
  Wire.begin();
  sht20.begin();
}

void loop()
{
  Serial.println((String)sht20.vpd() + " kPa VPD");
  Serial.println();
  delay(5000);
}

Dew Point

We also added a dew point calculation, the temperature water vapor comes out of the air. It is good to know so you can avoid mold and other moisture-related problems in plants.

And some code:

#include "uFire_SHT20.h"
uFire_SHT20 sht20;

void setup()
{
  Serial.begin(9600);
  Wire.begin();
  sht20.begin();
}

void loop()
{
  Serial.println((String)sht20.dew_point() + "°C dew point");
  Serial.println((String)sht20.dew_pointF + "°F dew point");
  Serial.println();
  delay(5000);
}

::measure_all()

To make things simpler, you can call measure_all() which will take a temperature, humidity, VPD, and dew point measurement all at once for you, and put them in class variables for access. This is quicker and easier than calling each method individually.

::begin()

And the last thing added was a new begin() method. It was added to make the library more in-line with other Arduino libraries and to make it easier to support a wider range of microcontrollers. You can specify the resolution, alternate I2C address, or Wire bus.

Show Comments