Reading temperature and humidity from a HTU21D sensor with an Arduino

A few days ago, my HTU21D temperature and humidity sensor from Adafruit arrived in the mail. I’m planning to use it for a temperature and humidity display at home.

HTU21D interfaced to an arduino

In one night I managed to start reading temperature and humidity measurements from the sensor using my own code that uses the Arduino Wire library. I wrote my own code instead of using the Adafruit HTU21D library to practice and learn interfacing a micro to an I2C device. All the measurement results are then output to the serial terminal.

Continue reading