Anyway, I have a thermometer at my desk and thought it would be fun to create a real time monitor for the temperature near the space blanket to compare. I threw together a ESP8266, DHT, and a small LCD that I recently ordered and wanted to test.
I plugged the LCD up as follows:
GND - GND
VCC - VIN pin
SDA - D2
SCL - D1
I plugged the DHT data connection into D2 and ground and power.
Here is the code.
I am using the LCD library from here: https://github.com/johnrickman/LiquidCrystal_I2C. Just download the zip and then in the Arduino IDE add the zip file as a library. You will also see that I have the code needed to connect to wifi and then post the data to a web service. I was using this to get some temperature trends in the office, and may turn that back on later so I just left it in there.
I then found a bunch of local weather buzz words and made a little border using an index card. The temperature is gathered every 30 seconds. I would get a NAN reading from the sensor often so I changed it so if NAN was the read it would just display the last good value.
0 comments:
Post a Comment