2. Temperature Window Opener


Description:

This code is split into two parts: The Wemos D1 Mini hosts a web server on WiFi for control and also measures the current temperature in our room. 

The NodeMCU asks the Wemos for temperature readings over WiFi and then controls a stepper motor that opens a window depending on the temperature and threshold it receives from our sensor. 

Note that if you download the code below, you will have to split it into separate files, since the tabs still count as beloning to the main .ino file.

Parts used:

TMP36 Analog temperature sensor, Nema 17 Bipolar stepper motor,  Wemos D1 Mini board and NodeMCU v1.0 board with ESP12E motor shield. Although we used different booards for each part, any ESP8266 microcontroller should work.