Digital Humidity and Temperature Monitor
I made a simple this simple setup to monitor my rooms temperature during gaming. And see how much of an effect my PC has to heating my room. At the moment it just shows the current values.
Moving Forward
I plan to use NodeMCU ESP8266 SoC (system on a chip) to take take the temperature and humidity reading and upload it to a SQL database periodically from which i plan to make a website which uses the Chart.js library to plot the data on a graph. to visually see. However i would have to get a more accurate and sensitive sensor since DHT11 is only accurate to +/- 2C and display integer values. Below is the code to the current setup.
Code
// include the library code: #include <LiquidCrystal.h> #include <SimpleDHT.h> int pinDHT11 = 9; SimpleDHT11 dht11; byte temperature = 0; byte humidity = 0; // initialize the library with the numbers of the interface pins LiquidCrystal lcd(12, 11, 5, 4, 3, 2); void setup() { // set up the LCD's number of columns and rows: Serial.begin(9600); lcd.begin(16, 2); } void loop() { readTemp(); lcd.setCursor(0, 0); lcd.print("Temp: "); lcd.print((int)temperature); lcd.print(" C"); lcd.setCursor(0, 1); lcd.print("Humidity: "); lcd.print((int)humidity); lcd.print(" %"); delay(500); } void readTemp() { int err = SimpleDHTErrSuccess; if ((err = dht11.read(pinDHT11, &temperature, &humidity, NULL)) != SimpleDHTErrSuccess) { Serial.print("Read DHT11 failed, err="); Serial.println(err); delay(1000); return; } }