Desk WeatherStation
Desk WeatherStation with esp8266, 1,3" oled display, GY-BME280 sensor and Python-Flask web application for data visualization.
Pin Connections
NodeMCU ESP8266 | OLED Display |
---|---|
3.3V | VCC |
GND | GND |
D1 | SCL |
D2 | SDA |
NodeMCU ESP8266 | BME280 |
---|---|
3.3V | VCC |
GND | GND |
D1 | SCL |
D2 | SDA |
Esp8266 Code Description
For the project I used this KeeYees kit that can be purchased at this link: Esp8266 Kit
I also used the terminal adapter for esp8266: Terminal adapter
The arduino code is the same as provided by the KeeYees demo except for a function that I inserted in the code that allows you to send the bme sensor data to the Python web application. Below the function:
Python Web Application Description
The python web application with Flask allows you to view the latest BME sensor data sent by esp8266 and the graphs (with the Plotly library) that show the trend of temperature, humidity and atmospheric pressure over time. The data is saved on the MySQL DB. I have deployed my application (also the DB) on pythonanywhere.
Demo