Easier End-User Setup For ESP32 Projects

As hackers, we occasionally forget that not everyone is enamored with the same nerdy minutia that we are. Configuring hardware by changing some lines in the code and compiling a new firmware doesn’t sound like that big of a deal to those of us who’ve been around the block a few times, but might as well be ancient Sanskrit to the average person. As long as your projects are for personal use this isn’t really a concern, but what if you plan on distributing the code for a project or perhaps even selling finished products? Shipping it out with hard-coded variables simply isn’t an option.

Code for loading configuration file from SPIFFS

In a recent video, [Proto G] shows a clever way to use WiFiManager to make configuring your ESP32 project easier for end-users. Not only can you use the captive portal system to configure the ESP32’s WiFi against a nearby access point, but it can allow users to enter in configuration data which can be picked up in your code by using SPI Flash File System (SPIFSS).

With the setup demonstrated in the video below by [Proto G], you don’t need anything more exotic than a web browser to configure the device. The end user simply searches for the device’s WiFi network, connects to it, and is presented with an easy to understand dialog which has them select a WiFi network to configure against along with some fields to enter in custom variables. All this information is then stored to a file on the SPI flash. When the ESP32 reboots, it reads the configuration from the saved file and applies the requested settings.

This is very similar to how many consumer devices are now configured, and even the less technically-inclined recipients of such a device should be able to work through the setup with a bit of hand-holding. If you plan on handing one of your ESP32 projects to John Q. Public, this is the kind of configuration you should be aiming for.

We’ve covered using WiFiManager to make ESP32 projects easier to manage, but the addition of arbitrary variables to the captive portal opens up a lot of possibilities. Just the kind of thing you need when you start considering the leap to commercial product.

10 thoughts on “Easier End-User Setup For ESP32 Projects

    1. Yes, but more people are going to be willing to dive into something they’re already more familiar with(Arduino). I agree there are more powerful options out there but this is a great way for anyone familiar with Arduino to get started with. It’s nice to see the increased compatibility the ESP32 is getting with different platforms.

  1. “This is very similar to how many consumer devices are now configured, and even the less technically-inclined recipients of such a device should be able to work through the setup with a bit of hand-holding.”

    Variable ease of use by leveraging a more powerful endpoint. e.g. programming in a browser, download to hardware.

Leave a Reply to Robert FossCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.