Humidity Measurement Using HYT939 and Raspberry Pi

HYT939 is a digital humidity sensor which works on I2C communication protocol. Humidity is a pivotal parameter when it comes to medical systems and laboratories. So, in order to accomplish these goals, we tried to interface HYT939 with Raspberry Pi. In this tutorial, the interfacing of the HYT939 sensor module with Raspberry Pi is demonstrated and its programming using Java language has also been illustrated.


To read the humidity values, we have used Raspberry Pi with an I2C adapter. This I2C adapter makes the connection to the sensor module easy and more reliable.

Step 1: Hardware Required

Hardware that is required to accomplish the task is as follows:

1. HYT939

2. Raspberry Pi

3. I2C Cable

4. I2C Shield For Raspberry Pi

5. Ethernet Cable

Step 2: Hardware Hookup

The hardware hookup section basically explains the wiring connections required between the sensor and the Raspberry Pi. Ensuring correct connections is the basic necessity while working on any system for the desired output. So, the requisite connections are as follows:

  • The HYT939 will work over I2C. Here is the example wiring diagram, demonstrating how to wire up each interface of the sensor.
  • Out-of-the-box, the board is configured for an I2C interface; as such, we recommend using this hookup if you’re otherwise agnostic. All you need is four wires!

Only four connections are required Vcc, Gnd, SCL and SDA pins and these are connected with the help of I2C cable. These connections are demonstrated in the pictures above.

Read More: Humidity Measurement Using HYT939 and Raspberry Pi

About The Author

Scroll to Top
Read previous post:
Automated Cat Feeder with Alexa and Amazon Dash

Introduction In November 2016, I built an automated Cat Feeder, powered by Amazon Alexa ( The first build was very...