Author Topic: ESP32 Arduino WiFi Manager & File System (SPIFFS)  (Read 10677 times)

0 Members and 1 Guest are viewing this topic.

Offline ProtoG42Topic starter

  • Contributor
  • Posts: 21
  • Country: us
ESP32 Arduino WiFi Manager & File System (SPIFFS)
« on: January 22, 2018, 03:30:30 pm »


The ESP32 is finally starting to become compatible with more and more popular Arduino libraries.

In the video I demonstrate using the WiFi Manager library for ESP32 in the Arduino IDE as well as the SPIFFS file system for the ESP32. It allows people to avoid having to hard code wifi credentials but in the video I show that it can also be used to add several other variables and parameters. Adding a few lines of code to the WiFiAP.cpp file allows the configuration screen to automatically pop up on a phone or computer when logging into the ESP32 set up SSID. Also, in the video I show the 3 lines of code that you can use to reset the wifi credentials and wipe the memory so you could make a physical reset button for a product.

Here are the main github libraries needed:

ESP32 Arduino Core: https://github.com/espressif/arduino-esp32

WiFi Manager: https://github.com/zhouhan0126/WIFIMANAGER-ESP32

WebServer: https://github.com/zhouhan0126/WebServer-esp32

DNSServer: https://github.com/zhouhan0126/DNSServer---esp32

Add these 3 lines of code to line 95 of WiFiAP.cpp to automatically pop up the configuration screen after connecting to the access point:

tcpip_adapter_dns_info_t dns_info;
dns_info.ip.u_addr.ip4.addr = IPAddress(192,168,4,1);
tcpip_adapter_set_dns_info(TCPIP_ADAPTER_IF_AP, TCPIP_ADAPTER_DNS_MAIN, &dns_info);
 
The following users thanked this post: ralphrmartin

Offline ralphrmartin

  • Frequent Contributor
  • **
  • Posts: 480
  • Country: gb
    • Me
Re: ESP32 Arduino WiFi Manager & File System (SPIFFS)
« Reply #1 on: January 25, 2018, 05:24:33 pm »
One thing missing - where is the source for your Arduino program? You only tell us about the libraries..
 

Offline ProtoG42Topic starter

  • Contributor
  • Posts: 21
  • Country: us
Re: ESP32 Arduino WiFi Manager & File System (SPIFFS)
« Reply #2 on: January 27, 2018, 07:40:21 am »
It is linked in the video description.
 

Offline 1anX

  • Regular Contributor
  • *
  • Posts: 195
  • Country: au
Re: ESP32 Arduino WiFi Manager & File System (SPIFFS)
« Reply #3 on: January 27, 2018, 08:57:19 am »
Good info, thanks for posting!
 

Offline ralphrmartin

  • Frequent Contributor
  • **
  • Posts: 480
  • Country: gb
    • Me
Re: ESP32 Arduino WiFi Manager & File System (SPIFFS)
« Reply #4 on: January 27, 2018, 07:32:15 pm »
Thanks!

By the way, what board type do you use in Arduino for this particular TTGO board?
« Last Edit: January 27, 2018, 08:17:59 pm by ralphrmartin »
 

Offline mdumdei

  • Newbie
  • Posts: 1
  • Country: us
Re: ESP32 Arduino WiFi Manager & File System (SPIFFS)
« Reply #5 on: October 31, 2018, 11:19:27 am »
I'm not seeing the link in the description - just text. I'm experienced with programming and electronics, but just getting started with this stuff and would love to go through the code. Looks like a good example of WiFi, JSON, SPIFFS - lots of good stuff.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf