-->
Page 1 of 1

ESP8266 NodeMCU Web Server using SPIFFS (Beginner Guide)

PostPosted: Fri May 26, 2023 12:22 pm
by LEDEDIT PRO
This tutorial shows how to create a web server that serves HTML and CSS files stored on the ESP8266 NodeMCU filesystem (SPIFFS) using the Arduino IDE. We'll generate separate HTML and CSS files rather than having to write the HTML and CSS text inside the Arduino sketch.

Image

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.
Image
    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).
The following figure shows a simplified diagram to demonstrate how things work.
Image
Learn more about it on LEDEdit PRO

https://lededitpro.com/esp8266-nodemcu-web-server-using-spiffs