[][src]Type Definition dht_hal::Dht22

type Dht22<P, T> = Dht<P, T, Dht22>;

A DHT22 (or AM2302, its wired variant) sensor.

This is the "luxury" version of the DHT series — DigiKey sells them for $10, which is twice as expensive as the DHT11. The extra $5 gets you relative humidity readings from 0-100% with 2-5% accuracy, and temperature readings from -40-80C with += 0.5C accuracy. This means that unless you actually don't care about measuring things, it's worth significantly more than buying two DHT11s. However, it has an 0.5Hz sampling rate, meaning it can only be read once every two seconds. This is fine, because the numbers it gives you are actually meaningful, unlike the blue piece of garbage.

It has a white housing and is a bit larger than the DHT11, so all your friends will instantly be able to tell you're a big spender. It also needs 3.3V to 5V. The AM2302 is exactly the same sensor, but with 3 2cm leads rather than pins, and a fancy hole in the case so you can screw it onto something. Whether or not this is worth another $5 is up to you, but it does have the advantage of not having to remember which of the 4 pins these things have "goes nowhere and does nothing".

Unlike the DHT11, these often (but not always!) have a 10K pullup resistor inside the housing. Unfortunately, there's no real way to tell whether or not you're one of the lucky ones, so you should probably add one anyway. Welcome to the wonderful world of cheap electronics components from China!