Create awesome Wifi Chat with Captive Portal using NodeMcu ESP8266

February 10th, 2019 by

In this tutorial, you will learn how to create a wifi chat with a captive portal using NodeMcuESP8266. You will also learn how to read and write to files in NodeMcu SPIFFS and to serve a web server.

Video Demonstration

 

Requirements

NodeMcu ESP8266
Arduino IDE
Arduino ESP8266 filesystem uploader
Download the Source Code Here:  ChatApp with Captive Portal Node Mcu Source Code (3049 downloads)

 

Environment Setup

We need to add NodeMcu ESP 12 to our Arduino IDE. Open up your IDE then go to “File -> Preferences” or simply hit “Ctrl + comma”

Paste http://arduino.esp8266.com/stable/package_esp8266com_index.json in additional board manager URLs.

Go to “Tools -> Board -> Boards Manager” search and install esp8266

Close and restart your Arduino IDE

Plug in your NodeMcu to your computer.

Selecting Port and Board

Go to Tools -> Port and select the COM Port of your NodeMCU. If you are not sure what port your NodeMcu is plugged in, go to Device Manager -> Ports (COM & LPT)

Now select NodeMcu 1.0 (ESP-12E Module) by clicking Tools -> Board. Scroll down until you find it.

 

Arduino ESP8266 Filesystem Uploader

Download Arduino ESP8266 Filesystem Uploader (direct link)  Unpack the tool in your sketchbook directory (the path will look like <sketchbook directory>/tools/ESP8266FS/tool/esp8266fs.jar).