Subscribe to Arduino Academy and start learning today for FREE!

Building the Heating / Air Conditioning Thermostat – Part 3

We continue with the project by building the temperature sensor module. We are using our favorite, the Dallas DS18B20 digital sensor. It uses one pin to communicate with the Arduino, along with +5vdc and Gnd. We add a 4.7k resistor between pins 2 & 3. Because we are using a single sensor, we do not need to know the address of the DS18B20 ahead of time. If you want to add a second sensor, to display outdoor temperature see our other tutorial. We are using the DS18B20 code from and the LCD code from

Don’t forget the updated One Wire and Dallas Libraries from

Become the Maker you were born to be. Try Arduino Academy for FREE!


Pin 1 on the left is Gnd, Pin 2 in the middle is +5vdc, and pin 3 on the right is data, according to the GVS standard we follow.

Notify of
Inline Feedbacks
View all comments


Would love your thoughts, please comment.x