Team : Théo Pirouelle
- ESP8266-12E
- Sensors:
- OLED Display
- 15 Wires
- Sign up new account at https://home.openweathermap.org/users/sign_in
- Get the API keys at https://home.openweathermap.org/api_keys
- Sign up new account at https://www.mathworks.com/mwaccount/register
- Create a new channel and configure it:
- Set the channel to public:
- Get the API keys of the channel:
If, when you connect your ESP8266 card to your computer via USB, you do not see it in the Device Manager, you need to install the USB-to-Serial driver.
Warning
For this project, I used version 1.8.4
of the Arduino IDE, other versions may not work with my source code.
- Open Arduino IDE
- File > Preferences
- Insert the following link in the "Additional Boards Manager URLs" text box: http://arduino.esp8266.com/stable/package_esp8266com_index.json
- Click on "OK" to close the dialog box.
- Go to Tools > Board > Board Manager and click on this option.
- Type "ESP8266" in the text box, and install the "ESP8266 by ESP8266 Community" option.
- Once the installation process is complete (it may take 1 minute or more), you can close the dialog box by clicking on the "Close" button.
- Go back to Tools > Board and you should see some new board choices appear at the bottom of the list.
- Select
NodeMCU 1.0 (ESP-12E Module)
. - Go to Tools > Port and select the correct port (as seen in the Device Manager, in my case it's
COM3
).
- The ESP8266 card must be properly connected to the computer via the data cable.
- Use
ESP8266Flasher.exe
burningAi-Thinker_ESP8266_DOUT_8Mbit_v1.5.4.1-a_20171130.bin
for the ESP8266. - Operation as shown (as before, make sure you select the correct port and click on the "Flash" button):
- In Sketch > Include Library > Add .ZIP Library..., import the
esp8266-weather-station-master.zip
library. - In Sketch > Include Library > Add .ZIP Library..., import the
json-streaming-parser-master.zip
library. - In Sketch > Include Library > Add .ZIP Library..., import the
esp8266-oled-ssd1306-master.zip
library. - In Sketch > Include Library > Manage Libraries..., type "Adafruit_BMP085" in the text box, and install the "Adafruit BMP085 Library by Adafruit" option:
- Open the main code.
- Update the
WIFI_SSID
and theWIFI_PWD
. - Update the OpenWeatherMap API key
OPEN_WEATHER_MAP_APP_ID
. - Update the ThingSpeak API key
api_key
.
It is preferable to carry out the wiring with the power off.
If the following error occurs in the Arduino IDE:
C:\Users\Admin\Documents\Arduino\libraries\esp8266-weather-station-master\src\TimeClient.cpp: In member function 'long int TimeClient::getCurrentEpochWithUtcOffset()':
C:\Users\Admin\Documents\Arduino\libraries\esp8266-weather-station-master\src\TimeClient.cpp:124:67:
error: invalid operands of types 'double' and 'long int' to binary 'operator%'
return round(getCurrentEpoch() + 3600 * myUtcOffset + 86400L) % 86400L;
Using library Adafruit_BMP085_Library at version 1.0.0 in folder:
C:\Users\Admin\Documents\Arduino\libraries\Adafruit_BMP085_Library
exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).
- Recommended configuration for Arduino IDE version 1.8.4 for Windows
- In Sketch > Include Library > Manage Libraries..., as "Type" select
Installed
, type "weather" in the text box, update "ESP8266 Weather Station by ThingPulse" to at least version1.6.5
, and click the "Update" button.