How to use temperature and humidity sensors on Raspberry Pi?

by Oscar


Some of the links on this page are affiliate links. I receive a commission (at no extra cost to you) if you make a purchase after clicking on one of these affiliate links. This helps support the free content for the community on this website. Please read our Affiliate Link Policy for more information.

Hello Oscar,

I was thinking how to make a weather station, and for now to use temperature and humidity sensors on Raspberry Pi. Can you tell me how to use these sensors on the RPi?

Also I want it to be able to predict the fore coming weather. How would I do this? What would the resources I need be? I would want it to put the details on a small LCD panel attached to the RPI.

Thanks, and I would EXTREMELY appreciate your kind help.


This temperature and humidity sensors for raspberry pi looks quite affordable and good to me! :-)

This is a adafruit tutorial using these sensors

But for connection directly to the raspberry pi, you can check this image out. It is not the same sensor but all the pins are the same. here this should work. btw im sorry if it melted your sensor cause i melted mine. USE 3V3 not 5v!! If you do not want to use pin 4 you could use pins 17,18,21,22,23,24,25. just change the pin name in your code.


Leave a Comment

By using this form, you agree with the storage and handling of your data by this website. Note that all comments are held for moderation before appearing.