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

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top