The SHT21 is a digital humidity and temperature sensor made by Sensirion. This repository contains a Java-based library for communication with such a SHT21 sensor. The code is based on the exemplary sample code on Sensirions home page
Supported operations:
To use this library, you have to specify the I2C address of the SHT21 sensor. After this you can poll measurements for temperature and relative humidity:
int I2C_ADDRESS = 0x40;
SHT21 sht21 = SHT21Impl.create(I2CBus.BUS_1, I2C_ADDRESS);
Measurement measurement_1 = sht21.measurePoll(MeasureType.HUMIDITY);
Measurement measurement_2 = sht21.measurePoll(MeasureType.TEMPERATURE);