ESPConnect is a simplistic and easy approch to having a WiFi manager on your ESP MCUs. It is a lightweight library which let's you configure WiFi networks without any fuss. ESPConnect works with both ESP8266 & ESP32.
Directly Through Arduino IDE ( Currently Submitted for Approval. Use Manual Install till it gets Approved.)
Go to Sketch > Include Library > Library Manager > Search for "ESPConnect" > Install
For Windows: Download the Repository and extract the .zip in Documents>Arduino>Libraries>{Place "ESPConnect" folder Here}
For Linux: Download the Repository and extract the .zip in Sketchbook>Libraries>{Place "ESPConnect" folder Here}
Download the Repository, Go to Sketch>Include Library>Add .zip Library> Select the Downloaded .zip File.
- ESP8266 Arduino Core - latest
- ESPAsyncTCP - v1.2.2
- ESPAsyncWebServer - v1.2.3
- ESP32 Arduino Core - latest
- AsyncTCP - v1.1.1
- ESPAsyncWebServer - v1.2.3
ESPConnect is a dead simple library which does your work in just 2 lines:
This function will return true
or false
depending on if ESPConnect was configured before or not. You can check with this function to perform certain functions before/after running ESPConnect portal.
This function sets the SSID and password for your captive portal. The third parameter - timeout
is optional which tells the library to keep the captive portal running for x
- milliseconds. (Default - 3 minutes
)
Call this function after autoConnect
to start the WiFi manager. This function will first try to connect to the previous configured WiFi credentials and if those are not found, it will spin up a captive portal. If the user doesn't sets the wifi credentials, the library will return to execute your rest of the code in the setup block.
Please note: WiFi inactivity is managed by your code. If you think you need to reboot the MCU if there is no WiFi then please call the ESP.restart()
function after checking ESPConnect.begin()
's response.
This function will return true
or false
depending on the WiFi STA connection status of your MCU. Use this to check if your MCU is connected to access point or not.
This function will erase configured WiFi STA connection details & and then proceed to disconnect the module.
Checkout example for ESP8266 and ESP32 in examples
directory. Click Here
Every contribution to this repository is highly appreciated! Don't fear to create issues / pull requests which enhance or fix the library, our maintainers are always ready to keep this library up & compiling.
ESPConnect consists of 2 parts:
- C++ library ( in
src
folder ) - Svelte webpage ( in
portal
folder ) ( provided source code for transparency )
You can contribute to the part you have most skill in.
If you like this amazing library, You can buy me a coffee:
ESPConnect is licensed under General Public License v3 ( GPLv3 ).
If your company needs a embedded web interface like ESPConnect/ESP-DASH for 'commercial applications', then you can send me a mail at: asrocks5@gmail.com.
I'm are open to a licensing deal or provide software development services which are along the lines of merging low-power microcontrollers with famous web technologies. For example: ESPConnect which consists of a C++ library and a lightweight Svelte SPA to fit inside a microcontroller.