Which sensor to buy

You might have noticed while reading the Necessary parts section that I mentioned two different sensors. One of them is DHT22 and the other one is named DS18B20. There are several differences between these two. I will cover the most important ones, so you can decide which is the right one for you. At the moment, these tutorials do not cover the option of having both of them at the same time. It does, however, cover the wiring and coding for each of them separately. The Raspberry Weather WordPress plugin works with either option, so you do not need to worry about anything. Tutorials on this site cover the wiring for each of those tutorials. No matter which one you decide to buy, you will have the needed information.

DHT22

The great thing about this sensor is, that it measures humidity as well as temperature. Sadly it is much less reliable and you can get different readings if you read its output in a short period. The other negative aspect is the code that is used for getting the output. It is not as easy to read its output, sometimes it takes a second try to get readings. The code that is used takes that into account and keeps retrying. Otherwise its a pretty good piece of equipment especially if you want to get the humidity information along with temperature.

DS18B20

This sensor is water proof but sadly does not read humidity. Its connected to a pretty long cable so you can read temperatures away from your weather station that gives away some heat and might interfere with the readings. Reading the values is really simple and the readings themselves are very accurate. If you do not need to read humidity, I really recommend that you decide for this sensor.