# DHT22 Negative temperature

**URL:** <https://forum.arduino.cc/t/dht22-negative-temperature/695993>\
**Category:** Sensors\
**Created:** [February 13, 2021, 7:30pm UTC](https://forum.arduino.cc/t/dht22-negative-temperature/695993 "2021-02-13T19:30:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ciprivat](https://avatars.discourse-cdn.com/v4/letter/c/439d5e/32.png) [@ciprivat](https://forum.arduino.cc/u/ciprivat)\
**Post date:** [February 13, 2021, 7:30pm UTC](https://forum.arduino.cc/t/dht22-negative-temperature/695993/1 "2021-02-13T19:30:14Z")

</div>

Hi guys,  
If someone could help it would be much apreciated.I am using DHT22 sensor for my weather station for temperature and humidity reading.Humidity works fine,but for temperature,after it drops and becomes negative the value reported is something like -3273 ...Could it be because of the library?  
i am using #include \<DHT.h\> .

#define DHTPIN 2 // what pin we're connected to  
#define DHTTYPE DHT22 // DHT 22 (AM2302)  
DHT dht(DHTPIN, DHTTYPE); //// Initialize DHT sensor for normal 16mhz Arduino  
int tempint;  
temp= dht.readTemperature();  
tempint = (int) temp;  
Serial.print(tempint);  
Serial.print(":");

much apreciated  
Thanks!

---

<div class="post-metadata">

**Author:** ![anon94801460](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@anon94801460](https://forum.arduino.cc/u/anon94801460)\
**Post date:** [February 13, 2021, 7:38pm UTC](https://forum.arduino.cc/t/dht22-negative-temperature/695993/2 "2021-02-13T19:38:27Z")

</div>

Please edit your post to include the complete program, surrounded by code tags.

---

<div class="post-metadata">

**Author:** ![srturner](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/srturner/32/549399_2.png) [@srturner](https://forum.arduino.cc/u/srturner)\
**Post date:** [February 15, 2021, 6:39pm UTC](https://forum.arduino.cc/t/dht22-negative-temperature/695993/3 "2021-02-15T18:39:43Z")

</div>

If you're located in parts of the U.S. right now, that could be a real temperature reading... 😕

S.

---

<div class="post-metadata">

**Author:** ![srturner](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/srturner/32/549399_2.png) [@srturner](https://forum.arduino.cc/u/srturner)\
**Post date:** [February 15, 2021, 9:49pm UTC](https://forum.arduino.cc/t/dht22-negative-temperature/695993/4 "2021-02-15T21:49:41Z")

</div>

...but seriously ... your code is incomplete. Where is the variable temp defined, for example?

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [June 15, 2021, 9:50pm UTC](https://forum.arduino.cc/t/dht22-negative-temperature/695993/5 "2021-06-15T21:50:08Z")

</div>

Closed on June 15, 2021, 9:50pm UTC

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.
