ESP8266-based Weather Monitor
Key Tech: Arduino IDE, C++, ESP8266, I2C, JavaScript
Project Goal:
As one of my first Arduino projects, my goal was to learn how to interact with sensors and effectively communicate the collected data.
What It Does:
Collects temperature and humidity data over a 24-hour period, displaying the data in a web dashboard.
How It Works:
Electronic hardware:
Uses a DHT11 temperature and humidity sensor is used and communicates with an ESP8266 via I2C. The ESP8266 is also used to host the webpage on my local WiFi network.
Software:
The code loaded onto the ESP8266 via Arduino IDE averages the readings from the DHT11 over the course of a minute, then again over the course of an hour and saves that final value. HTTP GET and POST requests are used to transfer the data between the webpage's JavaScript and the C++ code. The Chart.js library is then used to nicely display the collected data as well as the vanilla HTML and CSS I wrote.
Development Process:
Started with a mock-up of the webpage using Sketch
Assembled breadboard with ESP8266 and DHT11 sensor & wrote and tested code. Initially I had explored using an analog temperature sensor as I had one on hand, but since I also wanted to track humidity and all the sensors to do that were temperature & humidity digital sensor combos, it just made more sense to use the combined package. I also wanted to measure soil moisture, however, soil monitors seem to have a really short lifespan before corroding, deterring me away from buying one in the end.
Completed and working web dashboard with collected data! (minus the soil monitor) The temperature didn't change too much as this was done indoors during the summer with the air conditioning on... but there are some small ripples in there showing it works and has good uptime!