Simple thermometer on ESP8266 (NodeMCU V3) with web interface
To build the device, you will need a NodeMCU V3 microcontroller (or analogues), a DS18B20 thermal sensor, a 4.7k resistor. Connect according to this scheme:
Instead of 6F22, you can connect any other DC source with a voltage of 3.7-20 V
In the file
main.ino set SSID and password of your access point in which network the web interface should be available:
#define SSID "your ssid" #define PASS "your password"
Also if you connect the DS18B20 to other pin, change this value:
#define DS_PIN D8
After that, you can connect NodeMCU to your computer and upload the firmware.
Open the serial monitor with 9600 baud rate and copy the local address of the web interface. It usually looks like
192.168.1.104. Then open this in your browser. If everything is ok, you will see something in the likeness:
The current temperature, the maximum temperature and the difference between the last two changes are displayed here. If the sensor is not connected (as in this example), a value of -127 °C will be output.
The page is updated automatically every 10 seconds. The solution is terrible, but I was too lazy to screw AJAX.