This sketch measures temperatures and pressure. Measured results are printed on LCD screen and can be sent to remote HTTP server.
Classic Arduino UNO board with Grove Base Shield
for Grove extensions.
Image source: https://store.arduino.cc
16x2 LCD. In this project it is used to displays outside / inside temperatures and pressure hPa.
LCD RGB
Library
Image source: https://wiki.seeedstudio.com
Used to measure outside temperature. On analogue pin 0.
Grove-Temperature-Sensor
Library
Image source: https://wiki.seeedstudio.com
Used to measure inside temperature and pressure.
Barometric-Pressure-Sensor-DPS310
Library
Image source: https://wiki.seeedstudio.com
Used to store real time of measurements.
Grove-RTC
Library
Image source: https://wiki.seeedstudio.com
Wireless network. RX on pin 2, TX on pin 3.
Grove-UART-WiFi-V2-ESP8285
Library
Image source: https://wiki.seeedstudio.com
This code requires src/weatherStation/secrets.h
file to be created with following content.
#define SECRET_SSID "your wifi ssid" #define SECRET_PASS "your wifi password" #define SRV_CONNECT_HOST "IP or DNS name of remote server" #define SRV_CONNECT_PORT (int) 80 // or other port that is used #define SRV_REQ_HOST "IP or DNS name of remote server" #define SRV_URI "URI path on which POST request with weather report is sent"
Example
#define SECRET_SSID "mynet" #define SECRET_PASS "verysecret" #define SRV_CONNECT_HOST "myapp.azurewebsites.net" #define SRV_CONNECT_PORT (int) 80 #define SRV_REQ_HOST "myapp.azurewebsites.net" #define SRV_URI "/api/post-endpoint?code=lfddfnoren34vc"
Server collecting the reports, should expose POST endpoint accepting following request format.
Format
date time UTC,outside temp,inside temp,pressure
Example
20230421 203635,12.38,21.95,987.82
Measure light sensitivity
Light-Sensor