1

I had bought this DHT22 module on AliExpress. The module looks fine, but it does not work at all. I had tried lots of sketches, I tried to change the pin, I tried to change the cables, but I always have the same result: Failed to read from DHT22 sensor!.

That's what I get if I use the standard sketch DHTtester.ino:

problema

That's what I get if I use the standard sketch DHT_Unified_Sensor.ino:

problemo

Can you help me? Or is the module corrupted?

Starter
  • 153
  • 1
  • 13

1 Answers1

0

The product page you linked to has modules of different types.

Make sure you have uncommented the matching type in the this section of the example:

// Uncomment whatever type you're using!
//#define DHTTYPE DHT11   // DHT 11
#define DHTTYPE DHT22   // DHT 22  (AM2302), AM2321
//#define DHTTYPE DHT21   // DHT 21 (AM2301)

Also makers of these boards sometimes label them incorrectly or describe them incorrectly when selling them. If you're unsure what you have, try them all.

timemage
  • 5,639
  • 1
  • 14
  • 25