ESP8266 Weather Station
ESP8266 Weather Station
Download Favorite
By ohneschuh
Follow
More by
the
author:
This instructable is for the software of my Weater Station Project. Please read
it first to understand all explanations.
Because of the both MCUs the software concept is based on two parts:
The ESP8266 runs on Nodemcu and does the Internet connection and thingsp
eak.com related parts. The Arduino does all the sensor related things. The
https://www.instructables.com/id/ESP8266-Weather-Station-with-Arduino-2-Software/ 1/14
22/1/2019 ESP8266 Weather Station With Arduino – #2 Software: 4 Steps
All wifi and thingspeak.com relevant parameters are stored in the ESP8266
in a config file.
All sensor and measuring related parameter are set in the Arduino.
There's two modes in the Arduino software: standard and low power. The
standard version powering the ESP01 once and sends data regularly (short
periods) to thingspeak.com. The low power one sends the date also regularly
but within longer periods. Between two sendings the ESP01 is powered down.
Why using the standard version and not always save power? If you want a
more reliable, equidistant time stamp on thingspeak.com reconnection to wifi
takes too long and is not equal from one reconnection to the other. And if you
don't run the system on battery, power saving is not the most important aspect.
https://www.instructables.com/id/ESP8266-Weather-Station-with-Arduino-2-Software/ 2/14
22/1/2019 ESP8266 Weather Station With Arduino – #2 Software: 4 Steps
If not already done, flash the Nodemcu firmware to the ESP01. For flashing
see this other ESP01 project (link).
Extract all file from the the attached archive. To upload and communicate with
the ESP01 I use ESPlorer.
wifiStation = "yourssid"
wifiPW = "yourwifipw"
devName = "name_of_your_device"
thingsSpeakKey = "ts_write_key"
tsChannel = "ts_channel_nb"
LEDs
https://www.instructables.com/id/ESP8266-Weather-Station-with-Arduino-2-Software/ 3/14
22/1/2019 ESP8266 Weather Station With Arduino – #2 Software: 4 Steps
If red and green are reversed reverse the LEDs in the header.
weatherstation.zip Download
https://www.instructables.com/id/ESP8266-Weather-Station-with-Arduino-2-Software/ 4/14
22/1/2019 ESP8266 Weather Station With Arduino – #2 Software: 4 Steps
The Arduino is the measuring device. It reads all sensor values and calculates
the average over a specific time period (moving or rolling average).It also sets
the ESP01 to sleep and wake it up again.
There are few things to setup in the header individually. First the working
mode:
https://www.instructables.com/id/ESP8266-Weather-Station-with-Arduino-2-Software/ 5/14
22/1/2019 ESP8266 Weather Station With Arduino – #2 Software: 4 Steps
That's all!
tempArduino_low_04.i… Download
A→E:
sendData()
A←E:
D0 // not successful
D1 // successfully send to thingspeak.com
https://www.instructables.com/id/ESP8266-Weather-Station-with-Arduino-2-Software/ 6/14
22/1/2019 ESP8266 Weather Station With Arduino – #2 Software: 4 Steps
A→E:
A←E:
no answer
Wifi Status
E→A:
Step 4: Stability
To see the stability of the system here's the link to a chart from my
thingspeak.com account showing the temperature and the illuminance
somewhere in Germany:
https://thingspeak.com/plugins/13247
Actually it shows a one week overview. The system runs since mid of August
without a break.
https://www.instructables.com/id/ESP8266-Weather-Station-with-Arduino-2-Software/ 7/14
22/1/2019 ESP8266 Weather Station With Arduino – #2 Software: 4 Steps
I Made It!
https://www.instructables.com/id/ESP8266-Weather-Station-with-Arduino-2-Software/ 8/14
22/1/2019 ESP8266 Weather Station With Arduino – #2 Software: 4 Steps
Recommendations
https://www.instructables.com/id/ESP8266-Weather-Station-with-Arduino-2-Software/ 9/14
Moving and Talking Giant Lego Hulk MiniFig (10:1 Scale)
22/1/2019 ESP8266 Weather Station With Arduino – #2 Software: 4 Steps
by TechMartian in Arduino
Arduino Class
https://www.instructables.com/id/ESP8266-Weather-Station-with-Arduino-2-Software/
76,411 Enrolled 10/14
22/1/2019 ESP8266 Weather Station With Arduino – #2 Software: 4 Steps
https://www.instructables.com/id/ESP8266-Weather-Station-with-Arduino-2-Software/ 11/14
22/1/2019 ESP8266 Weather Station With Arduino – #2 Software: 4 Steps
Add Tip
Ask Question
Post Comment
2 Discussions
Reply Upvote
MicahD1 2 years ago Cool project!, i'm 90% the way there I've
made the hardware got the esp online with
thingspeak but, i've just been spending a
while trying to get the library's right and i'm
just having a bit of trouble with the Average
library namely the running average function,
i've tried older versions of the arduino ide
and eclipse, including all average.h libraries i
could find with still no luck, are you using
your own altered library?
This is the error i'm getting in the Arduino Ide
and eclipse using the standard Average
library from Majenko.
tempArduino_low_04.ino: In function 'void
setup()':
tempArduino_low_04:119: error:
'rollingAverage' was not declared in this
scope
tempArduino_low_04.ino: In function 'void
loop()':
tempArduino_low_04:147: error:
'rollingAverage' was not declared in this
scope
'rollingAverage' was not declared in this
scope
https://www.instructables.com/id/ESP8266-Weather-Station-with-Arduino-2-Software/ 12/14
22/1/2019 ESP8266 Weather Station With Arduino – #2 Software: 4 Steps
Post Comment
https://www.instructables.com/id/ESP8266-Weather-Station-with-Arduino-2-Software/ 13/14
22/1/2019 ESP8266 Weather Station With Arduino – #2 Software: 4 Steps
Categories About
Us
Technology
Workshop Who
Craft We Are
Home Why
Food Publish?
Play Jobs
Outside Contact
Costumes
Resources Find
Us
Residency
Program
Community
Sitemap
Help
https://www.instructables.com/id/ESP8266-Weather-Station-with-Arduino-2-Software/ 14/14