WiFiManager with ESP32 - Stop Hard-coding WiFi Credentials!

Тәжірибелік нұсқаулар және стиль

Stop hard-coding your WiFi connection information in your ESP32 Sketches - use WiFi Manager instead!
Article with code samples: dronebotworkshop.com/wifimanager
More articles and tutorials: dronebotworkshop.com
Join the conversation on the forum: forum.dronebotworkshop.com
Subscribe to the newsletter and stay in touch: dronebotworkshop.com/subscribe/
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

Пікірлер: 362

  • @Dronebotworkshop
    @Dronebotworkshop6 ай бұрын

    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!! It's happening on a lot of my videos, I'm taking steps to remove them manually, but as I have 162 videos, it will take some time. If you do run across a suspicious comment, I would appreciate you letting me know at info@dronebotworkshop.com. Thanks! Bill (The real one!)

  • @arireka3927

    @arireka3927

    5 ай бұрын

    1:20

  • @srinjayshrinivasshankar3811
    @srinjayshrinivasshankar38112 жыл бұрын

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

  • @gepetotube

    @gepetotube

    2 жыл бұрын

    True 100%

  • @michaeldiamond2269

    @michaeldiamond2269

    2 жыл бұрын

    My goto when I want to understand...

  • @Alkatross

    @Alkatross

    2 жыл бұрын

    He makes really helpful slides and graphics. Trainer godmode unlocked.

  • @exdiinnovandoporti

    @exdiinnovandoporti

    Жыл бұрын

    Link con tutorial para actualizar portal cautivo---------------------> kzread.info/dash/bejne/oJZoo9iSk9yYd5s.html

  • @simonmasters3295

    @simonmasters3295

    8 ай бұрын

    "Our old friend the ESP32" 😂

  • @anthonycalia1317
    @anthonycalia13172 жыл бұрын

    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.

  • @christopherleadholm6677
    @christopherleadholm66772 жыл бұрын

    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!

  • @sidneydrouet1323
    @sidneydrouet1323 Жыл бұрын

    Hi Bill, I'm a big fan of your videos, not only for the clear, organized, detailed and rich graphic information, but for your generosity in sharing your knowledge.... Big thanks 👍

  • @MiniStockpot
    @MiniStockpot2 жыл бұрын

    Your videos are just outstanding - you don't leave anything unexplained and take the normal approach where people assume a certain level of knowledge (and where you do that you're most always link to a video you've already made showing how that bit works!) which can really easily alienate beginners. Your instructions are so clear that I can actually watch your videos on two-and-a-half times speed and still follow them easily - thanks for making such wonderful videos and keep up the good work!! 😃

  • @exdiinnovandoporti

    @exdiinnovandoporti

    Жыл бұрын

    Link con tutorial para actualizar portal cautivo---------------------> kzread.info/dash/bejne/oJZoo9iSk9yYd5s.html

  • @Greglovesyoumore
    @Greglovesyoumore2 жыл бұрын

    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.

  • @haniDopeman

    @haniDopeman

    2 жыл бұрын

    I'm the kind of person who's intersted in everything i like knowledge makes me feel invincible And you seem to have an interest in electronic do you think it will be of good use !?

  • @Greglovesyoumore

    @Greglovesyoumore

    2 жыл бұрын

    @@haniDopeman yes I do

  • @haniDopeman

    @haniDopeman

    2 жыл бұрын

    @@Greglovesyoumore forgive me I was thinking out loud to write such a low tier question.

  • @exdiinnovandoporti

    @exdiinnovandoporti

    Жыл бұрын

    Link con tutorial para actualizar portal cautivo---------------------> kzread.info/dash/bejne/oJZoo9iSk9yYd5s.html

  • @DigitalLandscape
    @DigitalLandscape2 жыл бұрын

    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

  • @KG4JYS
    @KG4JYS2 жыл бұрын

    I like your ESP32 based videos a lot. I recently did a project where I needed far more performance than Arduino could provide. I tried Seeduino XAIO, Artemis, and esp32. Settled on the ESP32 and I'm going to continue using them for projects in place of Arduino. Thank you!

  • @MakerFabio
    @MakerFabio Жыл бұрын

    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!

  • @whitneydesignlabs8738
    @whitneydesignlabs87382 жыл бұрын

    Another great video, Bill. Thanks. I had my ESP on my network in no time. I think using this library will be kind of a game changer to make the ESP much more useful in network applications. Might have to incorporate it into my 6wd robot with a small LCD display to report the same info the sample sketches show on the serial port.

  • @rdalemd76
    @rdalemd766 ай бұрын

    Hi, I finished coding a ESP-32 One Wire Reader and realized the WiFi credentials were hard coded. This was the exact video I was looking for. Excellent job in explaining the uses of WiFi Manager.

  • @smidjepeter
    @smidjepeter2 жыл бұрын

    I've been watching your videos for a while, and I've learned a lot from them. Your personality is also nice to see and hear. The intro makes me laugh every time, nice to be able to follow your videos and learn something from them. thank you

  • @sajanvraj
    @sajanvraj2 жыл бұрын

    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!

  • @Dronebotworkshop

    @Dronebotworkshop

    2 жыл бұрын

    That's very nice of you to say Sajan, glad you enjoy my content!

  • @gpTeacher
    @gpTeacher16 күн бұрын

    This is AMAZING! I've been messing with html embedded in my sketches and trying to grab field data into my sketches for several days. This video demonstrates EVERYTHING I need for my current project. You've saved me weeks of time messing about when all I need it the functionality of the WiFiManager. Thank you so much!

  • @sunpeter8260
    @sunpeter8260 Жыл бұрын

    Thank you so much, Bill! The tutorial is concise and clear, you are a wonderful teacher! This is exactly what I've been looking for! Thank you again!

  • @TanvirAhmed101
    @TanvirAhmed10111 ай бұрын

    Such a gentle voice to explain complex topic, Amazing

  • @EvileDik
    @EvileDik2 жыл бұрын

    Amazing work, as usual Bill!

  • @dannydheaton2765
    @dannydheaton276511 ай бұрын

    Thank you for making this. I'm trying to learn code and there's a lot of choices in tutorials, but not many in native clearly spoken English. Your shop is an American Dream it looks to be. Most of the video was exactly what I needed so I'll be back for more. Where I got lost and your explanations sped up was when it came to the JSON and SPIFFS file and config setup and saving. However, I learned much of what I needed for a basic temp sensor I'm building several of. I've used the WifiManager when I got into all of this building many WLED controllers, but it was all prebuilt and finally I hit the button in my life where it was time to get down to understaniding and compiling my own code for projects I build for work and for fun. I'm going to see what else you have to offer on here and wondered if you use any other platforms to..... well basically show off your skills with a almost complete workshop like yours. Thanks again and hope to read a reply soon as this video is 1.5 years old now. So....What's new?

  • @janomusic61
    @janomusic616 ай бұрын

    I tried the sample with wifimanager on my project and to my surprise everything works i got the connection to my wifi and now i don't have to wait too long to connect my ESP32 with my project, This is the most educational video i found on the esp32, Keep sending more videos like that i learn a lot drom it Keep the good work Thanks a lot! Even after a year of publishing...

  • @ToniCorvera
    @ToniCorvera Жыл бұрын

    Excellent rundown, you covered all the basics (and a bit more) so that I can get going 😊 Was hoping to learn some about the OTA update feature but I guess that would have made the video too long.

  • @centrodoreforco-aulasderef7743
    @centrodoreforco-aulasderef77432 жыл бұрын

    Nobody explain better tech subjects over the youtube than this guy!

  • @paulmillard1130
    @paulmillard11302 жыл бұрын

    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.

  • @deitager8400
    @deitager84006 ай бұрын

    Many thanks for the basics. It very helps in many projects. Especially for the step from arduino to ESP with all the possibilities of WLAN, BT and all the others. The presentation and the kind of explaining the topics is very clear , not too fast and very understandable. In many other YT-Videos you lost time with unnecessary doings like showing the wiring (one wire after anaother) of a circuit and missing absolutly important background knowledge. Keep it forward.

  • @stevebrantley2637
    @stevebrantley2637 Жыл бұрын

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

  • @Dronebotworkshop

    @Dronebotworkshop

    Жыл бұрын

    And thank YOU, Steve, much appreciated!

  • @anonymous.youtuber
    @anonymous.youtuber2 жыл бұрын

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

  • @henryrambeau2460
    @henryrambeau246011 ай бұрын

    Thank you very much for teaching me a lot. I appreciate it every time you come out and you and you shop and show everybody how to do this especially somebody like me that doesn’t know what he’s doing. I know a little bit about computers but this is new to me. Thank you very much.

  • @wishicouldarduino8880
    @wishicouldarduino88802 жыл бұрын

    I'm glad you're here 😁👍I glossed right over this. awesome video!

  • @dennisjohnson1893
    @dennisjohnson18932 жыл бұрын

    I'm always a day late and a dollar short. Where was this video last week when I was building my WIFI status monitor out in my garage. Well, at least I know how to solve a few problems that I had. Thanks for the great video!

  • @ThumpinV
    @ThumpinV Жыл бұрын

    Thanks! Love your videos. Very much appreciate the work that you put into these videos. They are FANTASTIC! I love that you take the time to explain the “why” details.

  • @Dronebotworkshop

    @Dronebotworkshop

    Жыл бұрын

    Thank you so much, that is very kind of you!

  • @ed.puckett
    @ed.puckett2 жыл бұрын

    Thank you for another inspiring video! I wanted to mention that Arduino IDE versions before 1.8.19 have the log4j vulnerability.

  • @60pluscrazy
    @60pluscrazy2 жыл бұрын

    Your videos are as neat as your workbench. Well done 👌

  • @randalltockes2247
    @randalltockes22476 ай бұрын

    Absolutely love your videos. They've helped me on numerous occasions. Very thorough and well made. Thank you for all you do.

  • @MrBubba256
    @MrBubba2562 жыл бұрын

    Well done and timely for some projects I've started. Thanks!

  • @teenflon
    @teenflon2 жыл бұрын

    Literally just answered a question I posted on your other video :) excellent material

  • @Belquer
    @Belquer Жыл бұрын

    THANK YOU SO MUCH! Your tutorials are always in depth, on point and accurate! THANK YOU!

  • @HarishPillay
    @HarishPillay2 жыл бұрын

    Thanks for highlighting WifiManager. That was something that I've been looking for!

  • @henrybecker2842
    @henrybecker28422 жыл бұрын

    This is an excellent tutorial. I learned a lot. Thank you very much.

  • @edpenn9355
    @edpenn9355 Жыл бұрын

    Great video! I was having a hard time understanding how it works, but I get it now. Thanks for the detailed explanation. A real quality tutorial. I'm going to have to go back and check out your other stuff. Thank you so much.

  • @exdiinnovandoporti

    @exdiinnovandoporti

    Жыл бұрын

    Link con tutorial para actualizar portal cautivo---------------------> kzread.info/dash/bejne/oJZoo9iSk9yYd5s.html

  • @TypicalRiderPH
    @TypicalRiderPH Жыл бұрын

    This is one of the best tutorial videos I have ever watched.

  • @BinuMadhav.NetWork
    @BinuMadhav.NetWork Жыл бұрын

    Great Article, well narated! Full of small tips which others hide! Hats off you Sir!!

  • @drmosfet
    @drmosfet2 жыл бұрын

    Thanks for this useful info 👍 This setup approach make sense as people have been asked to program there router for over a decade now.

  • @EldonElledge
    @EldonElledge2 жыл бұрын

    As usual, such a great video. Thank you. I will sign up for the newsletter as we as buy some swag. Thank you, again.

  • @re.liable
    @re.liable2 жыл бұрын

    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

  • @DJCam87
    @DJCam87 Жыл бұрын

    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.

  • @MalluTrollen2024
    @MalluTrollen2024 Жыл бұрын

    I love the way you explain things, thanks a lot sir.

  • @yigitmertsevindim1669
    @yigitmertsevindim16698 ай бұрын

    This channel is the best channel to understand everything about what you are looking for in detail so why I really like that channel for this. Thanks a lot for precious explanations. Kind regards...

  • @marksnyder1296
    @marksnyder12962 жыл бұрын

    Good stuff! Thanks Bill! I can't wait to try this!

  • @TisforTech
    @TisforTech2 жыл бұрын

    Just what I was looking for, thanks!

  • @catchulater7483
    @catchulater74832 жыл бұрын

    One of your more fantastic videos, thank you.

  • @vinaymama
    @vinaymama2 жыл бұрын

    Thank you sir. It was explained in a simple and clear manner. Lot of my doubts are cleared now

  • @Sonnell
    @Sonnell29 күн бұрын

    As many before, I have to compliment you on your perfect presentation. Thank you :)

  • @kevintsilvers
    @kevintsilvers Жыл бұрын

    Thank you for clearly explaining things. I love your videos.

  • @andrewhollenbach7330
    @andrewhollenbach73302 жыл бұрын

    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.

  • @LDBuggy2

    @LDBuggy2

    5 ай бұрын

    Just experienced the psychic moment at 38:00 😅

  • @timarcher52
    @timarcher5211 ай бұрын

    This was a great video, helped me with exactly what I needed. Thank you!

  • @Leroys_Stuff
    @Leroys_Stuff2 жыл бұрын

    Thank you Bill as always informative video

  • @DesignBuildFixReview
    @DesignBuildFixReview2 жыл бұрын

    great info thanks for being so on point.

  • @thespencerowen
    @thespencerowen2 жыл бұрын

    Wow, what a well done video. This saves me days of research

  • @taj-ulislam6902
    @taj-ulislam69028 ай бұрын

    Exceptional video and presentation - best online video by a wide margin. Very useful information prepared with great care. Thanks. Keep it up. Truly remarkable!

  • @stevenmcneese8173
    @stevenmcneese8173 Жыл бұрын

    One of your best videos! Thank you so much!

  • @MrSidMan
    @MrSidMan2 жыл бұрын

    Dang. Where were you in 2015? Haha 😄 thanks for the awesomeness 👌 👏 👍

  • @mrma281
    @mrma281 Жыл бұрын

    Very informative and well explained, thank you.

  • @charlykappel0103
    @charlykappel0103 Жыл бұрын

    I am desperate integrating the code for the switch to reset the credentials into the webcam code. An explanation similar to your example with WiFi manager would be great. This works great

  • @alexxustube
    @alexxustube11 ай бұрын

    So helpful! Thanks, Bill! 👍👍👍

  • @muhammadbilal2000
    @muhammadbilal20002 жыл бұрын

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

  • @SrikantLive
    @SrikantLive Жыл бұрын

    What a brilliant explanation. Kudos

  • @miguelraulgonzalez7744
    @miguelraulgonzalez77442 ай бұрын

    This is pure gold! Thank you!!

  • @breebw
    @breebw2 жыл бұрын

    With the Raspberry Pi Zero 2 W's being next to impossible to get for a project I am doing, these modules could meet my need. A wireless module on a board like this. Incredible.

  • @exdiinnovandoporti

    @exdiinnovandoporti

    Жыл бұрын

    Link con tutorial para actualizar portal cautivo---------------------> kzread.info/dash/bejne/oJZoo9iSk9yYd5s.html

  • @lionahmmed9866
    @lionahmmed98662 жыл бұрын

    Thank you so much for the great lesson.

  • @BlackShadow_86
    @BlackShadow_862 жыл бұрын

    cool libraries! Thank you for the work!

  • @nalinux
    @nalinux2 жыл бұрын

    I didn't know this exist. Thanks, this will be really useful.

  • @fjs1111
    @fjs11112 жыл бұрын

    Learned something, thank you!

  • @mrcivster
    @mrcivster2 жыл бұрын

    Thank you so much for the very detailed video of WiFiManager. Please make a video of sketch update using wifi.

  • @Savage.735
    @Savage.7352 жыл бұрын

    Man that was awesome love it nice 👍

  • @gustavopoa
    @gustavopoa Жыл бұрын

    Nice!! Perfect explanation! Thanks for that.

  • @robertobrenes5283
    @robertobrenes52832 жыл бұрын

    Great video as always! Muchas gracias!

  • @jean-paulzimmermann6366
    @jean-paulzimmermann63668 ай бұрын

    Thanks a lot, this is very helpful and very well explained!

  • @drdave611
    @drdave6112 жыл бұрын

    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!!

  • @exdiinnovandoporti

    @exdiinnovandoporti

    Жыл бұрын

    Link con tutorial para actualizar portal cautivo---------------------> kzread.info/dash/bejne/oJZoo9iSk9yYd5s.html

  • @phamvu5066
    @phamvu5066 Жыл бұрын

    Thank so much for your sharing!

  • @curtkeisler7623
    @curtkeisler76232 жыл бұрын

    Exactly what I was looking for.

  • @ytdemori
    @ytdemori2 жыл бұрын

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

  • @VictorBorah-Invincible
    @VictorBorah-Invincible Жыл бұрын

    Wow, that was an excellent tutorial Thanks for the tutorial!

  • @Dronebotworkshop

    @Dronebotworkshop

    Жыл бұрын

    Thank you, much appreciated! Glad you enjoyed the tutorial.

  • @ykm_online
    @ykm_online Жыл бұрын

    Excellent video. One additional info .WROOM-32 version supports only 1 band 2.4Ghz in wifi ( which is good for many routers ). For dual band support the newer chip C5 version supports wifi over both 2.4 and 5GHz band. ( as read by me )

  • @exdiinnovandoporti

    @exdiinnovandoporti

    Жыл бұрын

    Link con tutorial para actualizar portal cautivo---------------------> kzread.info/dash/bejne/oJZoo9iSk9yYd5s.html

  • @JLCPCB
    @JLCPCB2 жыл бұрын

    Very cool tutorial! 😇

  • @quangthango0o
    @quangthango0o2 жыл бұрын

    Amazing tutorial!

  • @MitzpatrickFitzsimmons
    @MitzpatrickFitzsimmons2 жыл бұрын

    Thisa is excellent.. thank you!

  • @qdzung86
    @qdzung86 Жыл бұрын

    This is the best instruction for wifimanager.

  • @badvideocamera
    @badvideocamera10 ай бұрын

    Great info! Thanks a lot!

  • @felipecoral4537
    @felipecoral45372 жыл бұрын

    this is a good video, the explication and the methodology are simple for understand, thanks

  • @MenezesDailton
    @MenezesDailton2 жыл бұрын

    Hello from Brazil... Great contribution... Thanks a lot...

  • @jacobframe8769
    @jacobframe87698 ай бұрын

    Fantastic, thank you for sharing.

  • @vectorsigma9903
    @vectorsigma99032 жыл бұрын

    Great video! Thank you.

  • @altitude1039
    @altitude10392 жыл бұрын

    Thank you so much! I was looking for something like this, and didn't know how to do it. Be sure to use an eight digit password if you decide to customize the sketch or it won't work.

  • @ethzero
    @ethzero2 жыл бұрын

    Excellent stuff! Cheers.

  • @tincho6720
    @tincho6720 Жыл бұрын

    Chapeau! super clear info!!! thanks

  • @hugbearsx4
    @hugbearsx42 жыл бұрын

    Flawless. Thank you!

  • @FlexDRG
    @FlexDRG2 жыл бұрын

    In the camera example: Would it help to put the original bit of wifi code in a subroutine and the manager in an other subroutine and have both called in the setup but with one or the other commented out? This would make it simple to test code without needing to go through wifi setup during testing. And be easy to switch to wifi setup when you are (almost) done with testing?

  • @bayareapianist
    @bayareapianist2 жыл бұрын

    As a newby to esp32 world, could you recommend what version I should buy? eBay or Amazon or somewhere else? I heard audrinos IDE works fine with esp32. I love the features of esp32. Thanks for your help.

  • @radeonblue1816
    @radeonblue18162 жыл бұрын

    Thank you for really good explanation. However, one thing I was unable to understand was that why did you uncommented 'wm.resetSettings()'? You said something about production but I was not able to get a clear explanation that why it was supposed to be uncommented until it reaches production. Please correct me if I am wrong.

  • @grhgorhsliaphs4166
    @grhgorhsliaphs41662 жыл бұрын

    Amazing work 👏👏

Келесі