The web server we'll create shows how to control the ESP8266 outputs and display sensor readings. We'll control an LED and display sensor readings from a BME280 sensor as an example.
The concepts learned in this tutorial may be used to control or display sensor readings from additional sensors.
Project Overview
It's important to outline what our web server will accomplish so that it's easier to comprehend before going straight to the project.
- The web server controls an LED connected to ESP8266 GPIO 2. This is the ESP8266 on-board LED. You can control any other GPIO.
The web server page shows two buttons: ON and OFF to turn GPIO 2 on and off.
The web server page also shows the current GPIO state.
You’ll also use a BME280 sensor to display sensor readings (temperature, humidity, and pressure).
Learn more about it on LEDEdit PRO
https://lededitpro.com/esp8266-nodemcu-web-server-using-spiffs