WiFiManager with ESP32 - Stop Hard-coding WiFi Credentials!

preview_player
Показать описание
Stop hard-coding your WiFi connection information in your ESP32 Sketches - use WiFi Manager instead!

The ESP32 is an amazing microcontroller. It’s a powerful 32-bit processor with multiple I/O ports. 12-bit A/D converters and a variety of interfaces. But the one thing that makes it stand out above the crowd is its built-in WiFi and Bluetooth capabilities.

When we experiment with the ESP32 WiFi we generally just hard-code our WiFi login information directly in our sketches. Some people use an external file, but it is just another way to accomplish the same thing.

In both cases, our code is compiled and loaded onto our ESP32, so the ESP32 is locked into using that WiFi SSID and password. If you want to change these parameters to use your device on another WiFi network, then you need to change your code and recompile.

This isn’t a great arrangement, especially if you want to move your creation to another network, share it with a friend or even create a commercial product.

Enter WiFiManager. This great library lets you avoid hard-coding your WiFi parameters. Instead, you use a web-based interface to configure your SSID and password, so you can use your ESP32 project anywhere.

You can also add additional parameters of your own, making WiFiManager an ideal solution for both private and commercial designs.

Today I’ll show you how to use WiFiManager with the ESP32 (it can also be used with the ESP8266).

Here is the Table of Contents for today's video:

00:00 - Introduction
03:09 - WiFiManager
11:45 - WiFiManager Installation
13:29 - Using WiFiManager
18:05 - WiFiManager On-Demand
23:59 - Modifying Sketches to use WiFiManager
30:07 - Adding Custom Parameters
36:42 - JSON & SPIFFS
39:40 - Saving Parameter Data
53:04 - Conclusion

You’ll find WiFiManager is easy to use, and that you can quickly adapt your existing sketches to eliminate the hard-coded SSID and password. Give it a try and let me know what you think.

Hope you enjoy the video!

Bill
Рекомендации по теме
Комментарии
Автор

Hi everyone - It's come to my attention that there has been someone masquerading as myself, responding to some comments here with a link to a Telegram chat to win a prize from me. THIS IS A SCAM, I am not holding a contest, nor do I have a Telegram account. PLEASE DO NOT RESPOND TO THESE MESSAGES!!


Thanks!

Bill (The real one!)

Dronebotworkshop
Автор

These are seriously the most well-explained and detailed videos in youtube about electronics and programming.

srinjayshrinivasshankar
Автор

Or we can just use bluetooth to send wifi credentials to the esp32 with a bluetooth data send app and then connect to wifi

snopz
Автор

Thanks for all your work. I've been following you for a while - your videos and topics are the best.

stevebrantley
Автор

Just discovered about ESP32 and ESP8266 lately. They're such amazing devices. I don't think I'll be seeing Arduino Nanos again anytime soon lmao

re.liable
Автор

You have a wonderful talent for being able to simplify complex topics and present them in a way most people can comprehend. Nice work as ususal.

anthonycalia
Автор

Very clear explanation! May ask you which is the software that you use to draw so awesome and clear schematics?

ytdemori
Автор

I literally found this knowledgeable gentleman's channel a few days ago. This channel is perfect for everyone with a beginner/basic sense of electronics. Very well spoken and highly recommend this.

Greglovesyoumore
Автор

Thanks a lot for your detailed videos which cover fundamentals all the way to advanced concepts for each topic. I am in awe of the efforts you put in for such high quality content! You are the BEST in this training space!

sajanvraj
Автор

Well explained Bill, thanks. Make a video on Arduino MKR WiFi 1010, too. That is a bit challenging.

muhammadbilal
Автор

Very concise, very well explained, thank you so much for sharing 🙏🏻

anonymous.youtuber
Автор

I'm working working with the WifiManager for years on my ESP8266 projects, but because of your workshop video, I've learned some stuff again. So thanks a lot for that. Regarding the ESP32, there is a smaller version available, I'm using for my projects. It's the WEMOS D1 mini ESP32. It is small but powerfull.
Greetings from the rhine-main-region, germany
Alex

DigitalLandscape
Автор

Nice addition to your videos! I see you've been churning them out quite frequently, lately. Good work! I have been going back through some of your older videos, the one for the HC-SR501 PIR sensor, specifically, just yesterday!

Great stuff! Excellent work in the Workshop!

christopherleadholm
Автор

You are really good. You touched all the possible points needed when provisioning Wi-Fi and parameters instead of hardcoding. Many thanks, will use this on my IOT chicken coop!

MakerFabio
Автор

This guy is the truth! Take it from someone who has been through it all, I'm talking all the Indian students videos, German amateur enthusiasts, and random channels (are we still talking about electronics?!?!?). On a serious note, if this guy does a video on it, then it will be top 5 videos that exist so save yourself the time an just subscribe.

DJCam
Автор

The timeliness of this information could not be better! I've been developing sensor uses (VOC, CO2, particulates, T, P, %RH, etc.) using the 8266 for a couple of years. I'm ready to begin deploying to other locations with other WiFi networks and have been struggling with how to find a way to do this. I knew it must exist, but was not aware of WiFiManager.

This video makes it seem very feasible now... THANKS!!

drdave
Автор

Marvellous full of clarity like all your videos. Helps me greatly as I'm getting on a bit and it helps remind me how to do this stuff. you're a real star ThankYou.

paulmillard
Автор

I always like your videos, because you speak slowly and explain clearly. I request you to publish a sketch to add MQTT server, user name and password using WiFi Manager please.

rarenu
Автор

It's like you're psychic and basing your video ideas off my thoughts. Last week when I was quickly programming an esp32 I thought to myself, "I really shouldn't hardcode this sh*t". Bam, 1 week later you make me a guide.

andrewhollenbach
Автор

I enjoy your videos, they are very good, my network at home is 10.0.0 and I have the ESP32 working and serial monitor is waiting for a connection. I can swap connections on my phone no problem and it says connected without internet. If I were to use this with an ESP32cam I'd want to be able to see my camera output on my PC. Can the 192.168.4 IP scheme be changed? OK, I still need to do some reading...

tcape