Contents
1.
Introduction ................................................................................................................... 4
2.
Assembly ...................................................................................................................... 5
A.
ESP8266 Module .................................................................................................. 5
B.
OLED Display ........................................................................................................ 6
C.
DHT11 Humidity & Temperature Sensor .............................................................. 7
D.
Wires & Cables ...................................................................................................... 8
3.
Tool Setup .................................................................................................................... 9
A.
Download and Install the Serial Driver ................................................................ 10
B.
The Arduino IDE .................................................................................................. 11
C.
Install the ESP8266 tool chain ............................................................................ 12
D.
Selecting the Correct Board ................................................................................ 13
E.
Setting the Correct Port ....................................................................................... 14
F.
Testing the Setup: WiFi Scanner ........................................................................ 15
G.
Summary ............................................................................................................. 16
4.
ESP8266 Programming Basics .................................................................................. 17
A.
Preparation .......................................................................................................... 17
B.
The Arduino Sketch ............................................................................................. 18
C.
Hello World: The serial console .......................................................................... 19
D.
Input/Output: GPIO pins ...................................................................................... 21
E.
Interrupts ............................................................................................................. 23
F.
Measuring analog signals ................................................................................... 24
G.
WiFi ..................................................................................................................... 25
H.
HTTP ................................................................................................................... 26
5.
The ESP8266 WeatherStation ................................................................................... 30
A.
Installing the libraries........................................................................................... 30
B.
Open the Weather Station Example .................................................................... 32
C.
Getting the OpenWeatherMap API Key .............................................................. 33
D.
Configuring the Weather Station ......................................................................... 34
E.
Connecting the Hardware ................................................................................... 35
F.
First Run .............................................................................................................. 37
G.
Summary ............................................................................................................. 38
6.
The WeatherStation Code Explained ......................................................................... 39
A.
The JSON Streaming Parser............................................................................... 39