This is a basic Arduino Weather Station for Weather Underground using a Nodemcu and BME280 temp humidity and pressure sensor. You can set the timer for updates, currently set for every three minutes. Please ask questions on this page, I love responding to people so don’t be afraid to say hello. If this is your first ever Arduino project then get a hold of me using the comments below and I’ll help you get it setup.
IMPORTANT: The bme280 sensors are known to read a little bit high and have a floating temperature reading error or offset. If you’re ok with it being off a few degrees or you are willing to adjust the code a bit for your sensors error amount than this is a great little project. If not, I’ve built a section on adding in a DHT22 sensor to this same project.
.Zip file for the code Click Here or scroll down and both files are printed on the page.
Very Important: Your WU weatherstation will not work on the newer ESP8266 board library. You’ll need to go to your board manager, find your install for esp8266 and then select 2.4.2 I’ve no idea why it doesn’t work on any other version, but I was pulling my hair out with this project and then randomly read that someone had to downgrade to make it work. Once you have it uploaded to your board you can go back to the newest update for your future projects.
ALSO VERY IMPORTANT: The picture below does not show a wire between D0 and RST. This is for the deep sleep function to help save power usage. It’s what wakes up the board to send the data. When you’re uploading to the nodemcu remove one end of this jumper from D0 to RST or you could get errors while trying to send the script to the Nodemcu.
Normally the BME280 sensor reads high from 2 to 4 degrees Celsius. This project includes a way to correct your sensor. You’ll have to decide on how to correct it. If you want it accurate in winter and summer you’ll have to update your code during the season changes.
The alternative is to set it to about 3 degrees offset and have it average out. Currently it’s winter here and I’ve got it set bang on to see how it changes at it warms up around here in spring.
To fix the over temp issue on a BME280 find this line:
float sensor_temperature = bme.readTemperature() * 9/5+32; // Read temperature as Fahrenheit
Change that line where it says 9/5+32 to 9/5+30 like this:
float sensor_temperature = bme.readTemperature() * 9/5+30; // Read temperature as Fahrenheit
If you find that your reading is constantly over temp by say 5 degrees. Then you reduce the number to 27 instead of the original 32.
Please feel free to post questions about the Arduino weather station for weather underground project below or email me at email@example.com