Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.

Commit 0fe56dc

Browse files
authored
v1.4.0 to add support to ESP32-C3
### Releases v1.4.0 1. Add **LittleFS and SPIFFS** support to new **ESP32-S2** boards (**Arduino ESP32C3_DEV**). Check [HOWTO Install esp32 core for ESP32-S2 (Saola, AI-Thinker ESP-12K) and ESP32-C3 boards into Arduino IDE](#howto-install-esp32-core-for-esp32-s2-saola-ai-thinker-esp-12k-and-esp32-c3-boards-into-arduino-ide). 2. Add **EEPROM and SPIFFS** support to new **ESP32-C3** boards (**Arduino ESP32C3_DEV**). Check [HOWTO Install esp32 core for ESP32-S2 (Saola, AI-Thinker ESP-12K) and ESP32-C3 boards into Arduino IDE](#howto-install-esp32-core-for-esp32-s2-saola-ai-thinker-esp-12k-and-esp32-c3-boards-into-arduino-ide).
1 parent bd834a7 commit 0fe56dc

File tree

11 files changed

+250
-47
lines changed

11 files changed

+250
-47
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Please ensure to specify the following:
2929
Arduino IDE version: 1.8.13
3030
ESP8266 Core Version 2.7.4
3131
OS: Ubuntu 20.04 LTS
32-
Linux xy-Inspiron-3593 5.4.0-70-generic #78-Ubuntu SMP Fri Mar 19 13:29:52 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
32+
Linux xy-Inspiron-3593 5.4.0-72-generic #80-Ubuntu SMP Mon Apr 12 17:35:00 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
3333
3434
Context:
3535
The board couldn't autoreconnect to Local Blynk Server after router power recycling.

README.md

Lines changed: 200 additions & 34 deletions
Large diffs are not rendered by default.

examples/ESP_WiFi/ESP_WiFi.ino

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@
88
99
Built by Khoi Hoang https://github.com/khoih-prog/ESP_WiFiManager_Lite
1010
Licensed under MIT license
11-
Version: 1.2.0
11+
Version: 1.4.0
1212
1313
Version Modified By Date Comments
1414
------- ----------- ---------- -----------
1515
1.0.0 K Hoang 04/02/2021 Initial coding for ESP32/ESP8266
1616
1.1.0 K Hoang 12/02/2021 Add support to new ESP32-S2
1717
1.2.0 K Hoang 22/02/2021 Add customs HTML header feature. Fix bug.
18+
1.3.0 K Hoang 12/04/2021 Fix invalid "blank" Config Data treated as Valid. Fix EEPROM_SIZE bug
19+
1.4.0 K Hoang 21/04/2021 Add support to new ESP32-C3 using SPIFFS or EEPROM
1820
*****************************************************************************************************************************/
1921

2022
#include "defines.h"

examples/ESP_WiFi/defines.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,14 @@
4949
/////////////////////////////////////////////
5050

5151
// LittleFS has higher priority than SPIFFS
52+
#if ( ARDUINO_ESP32C3_DEV )
53+
// Currently, ESP32-C3 only supporting SPIFFS and EEPROM. Will fix to support LittleFS
54+
#define USE_LITTLEFS false
55+
#define USE_SPIFFS true
56+
#else
5257
#define USE_LITTLEFS true
5358
#define USE_SPIFFS false
59+
#endif
5460

5561
/////////////////////////////////////////////
5662

examples/ESP_WiFi_MQTT/ESP_WiFi_MQTT.ino

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@
88
99
Built by Khoi Hoang https://github.com/khoih-prog/ESP_WiFiManager_Lite
1010
Licensed under MIT license
11-
Version: 1.2.0
11+
Version: 1.4.0
1212
1313
Version Modified By Date Comments
1414
------- ----------- ---------- -----------
1515
1.0.0 K Hoang 04/02/2021 Initial coding for ESP32/ESP8266
1616
1.1.0 K Hoang 12/02/2021 Add support to new ESP32-S2
1717
1.2.0 K Hoang 22/02/2021 Add customs HTML header feature. Fix bug.
18+
1.3.0 K Hoang 12/04/2021 Fix invalid "blank" Config Data treated as Valid. Fix EEPROM_SIZE bug
19+
1.4.0 K Hoang 21/04/2021 Add support to new ESP32-C3 using SPIFFS or EEPROM
1820
*****************************************************************************************************************************/
1921

2022
/****************************************************************************************************************************

examples/ESP_WiFi_MQTT/defines.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,14 @@
4949
/////////////////////////////////////////////
5050

5151
// LittleFS has higher priority than SPIFFS
52+
#if ( ARDUINO_ESP32C3_DEV )
53+
// Currently, ESP32-C3 only supporting SPIFFS and EEPROM. Will fix to support LittleFS
54+
#define USE_LITTLEFS false
55+
#define USE_SPIFFS true
56+
#else
5257
#define USE_LITTLEFS true
5358
#define USE_SPIFFS false
59+
#endif
5460

5561
/////////////////////////////////////////////
5662

library.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "ESP_WiFiManager_Lite",
3-
"version": "1.3.0",
4-
"keywords": "wifi, wi-fi, MultiWiFi, multi-wifi, ESP32, ESP32-S2, ESP8266, Credentials, Manager, Config Portal, config-portal, DoubleReset, MultiReset, Detector, dynamic-params, dynamic, customs-header, littlefs, littlefs-esp32, spiffs",
3+
"version": "1.4.0",
4+
"keywords": "wifi, wi-fi, MultiWiFi, multi-wifi, WiFiManager, esp8266, esp32, esp32-s2, esp32-c3, Communication, iot, credentials, persistent, config-portal, DoubleReset, MultiReset, DoubleResetDetector, littlefs, spiffs, eeprom, light-weight",
55
"description": "Library to configure MultiWiFi/Credentials at runtime for ESP32 (including ESP32-S2) and ESP8266 boards. You can also specify DHCP HostName, static AP and STA IP. Use much less memory compared to full-fledge WiFiManager. Config Portal will be auto-adjusted to match the number of dynamic custom parameters. Optional default Credentials to be autoloaded into Config Portal to use or change instead of manually input. Credentials are saved in LittleFS, SPIFFS or EEPROM. New powerful-yet-simple-to-use feature to enable adding dynamic custom parameters from sketch and input using the same Config Portal. Double or MultiDetectDetector as well as Virtual Switches feature permits entering Config Portal as requested. Configurable Customs HTML Headers, including Customs Style, Customs Head Elements, CORS Header.",
66
"authors":
77
{

library.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name=ESP_WiFiManager_Lite
2-
version=1.3.0
2+
version=1.4.0
33
author=Khoi Hoang
44
maintainer=Khoi Hoang <[email protected]>
55
license=MIT
6-
sentence=Light-Weight MultiWiFi/Credentials Manager for ESP32 (including ESP32-S2) and ESP8266 boards. Powerful-yet-simple-to-use feature to enable adding dynamic custom parameters.
7-
paragraph=Library to configure MultiWiFi/Credentials at runtime for ESP32 (including ESP32-S2) and ESP8266 boards. You can also specify DHCP HostName, static AP and STA IP. Use much less memory compared to full-fledge WiFiManager. Config Portal will be auto-adjusted to match the number of dynamic custom parameters. Optional default Credentials to be autoloaded into Config Portal to use or change instead of manually input. Credentials are saved in LittleFS, SPIFFS or EEPROM. New powerful-yet-simple-to-use feature to enable adding dynamic custom parameters from sketch and input using the same Config Portal. Double or MultiDetectDetector as well as Virtual Switches feature permits entering Config Portal as requested. Configurable Customs HTML Headers, including Customs Style, Customs Head Elements, CORS Header.
6+
sentence=Light-Weight MultiWiFi/Credentials Manager for ESP32 (including ESP32-S2 and ESP32-C3) and ESP8266 boards. Powerful-yet-simple-to-use feature to enable adding dynamic custom parameters.
7+
paragraph=Library to configure MultiWiFi/Credentials at runtime for ESP32 (including ESP32-S2 and ESP32-C3) and ESP8266 boards. You can also specify DHCP HostName, static AP and STA IP. Use much less memory compared to full-fledge WiFiManager. Config Portal will be auto-adjusted to match the number of dynamic custom parameters. Optional default Credentials to be autoloaded into Config Portal to use or change instead of manually input. Credentials are saved in LittleFS, SPIFFS or EEPROM. New powerful-yet-simple-to-use feature to enable adding dynamic custom parameters from sketch and input using the same Config Portal. Double or MultiDetectDetector as well as Virtual Switches feature permits entering Config Portal as requested. Configurable Customs HTML Headers, including Customs Style, Customs Head Elements, CORS Header.
88
category=Communication
99
url=https://github.com/khoih-prog/ESP_WiFiManager_Lite
1010
architectures=esp8266,esp32
69.3 KB
Loading

src/ESP_WiFiManager_Lite.h

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,35 @@
99
Built by Khoi Hoang https://github.com/khoih-prog/ESP_WiFiManager_Lite
1010
Licensed under MIT license
1111
12-
Version: 1.3.0
12+
Version: 1.4.0
1313
1414
Version Modified By Date Comments
1515
------- ----------- ---------- -----------
1616
1.0.0 K Hoang 04/02/2021 Initial coding for ESP32/ESP8266
1717
1.1.0 K Hoang 12/02/2021 Add support to new ESP32-S2
1818
1.2.0 K Hoang 22/02/2021 Add customs HTML header feature. Fix bug.
1919
1.3.0 K Hoang 12/04/2021 Fix invalid "blank" Config Data treated as Valid. Fix EEPROM_SIZE bug
20+
1.4.0 K Hoang 21/04/2021 Add support to new ESP32-C3 using SPIFFS or EEPROM
2021
*****************************************************************************************************************************/
2122

2223
#pragma once
2324

2425
#ifndef ESP_WiFiManager_Lite_h
2526
#define ESP_WiFiManager_Lite_h
2627

27-
#if !( ESP32 || ESP8266)
28-
#error This code is intended to run on the ESP32/ESP8266 platform! Please check your Tools->Board setting.
28+
#if !( defined(ESP8266) || defined(ESP32) )
29+
#error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting.
30+
#elif ( ARDUINO_ESP32S2_DEV || ARDUINO_FEATHERS2 || ARDUINO_ESP32S2_THING_PLUS || ARDUINO_MICROS2 || \
31+
ARDUINO_METRO_ESP32S2 || ARDUINO_MAGTAG29_ESP32S2 || ARDUINO_FUNHOUSE_ESP32S2 || \
32+
ARDUINO_ADAFRUIT_FEATHER_ESP32S2_NOPSRAM )
33+
#warning Using ESP32_S2. To follow library instructions to install esp32-s2 core and WebServer Patch
34+
#define USING_ESP32_S2 true
35+
#elif ( ARDUINO_ESP32C3_DEV )
36+
#warning Using ESP32_C3. To follow library instructions to install esp32-c3 core. Only SPIFFS and EEPROM OK.
37+
#define USING_ESP32_C3 true
2938
#endif
3039

31-
#define ESP_WIFI_MANAGER_LITE_VERSION "ESP_WiFiManager_Lite v1.3.0"
40+
#define ESP_WIFI_MANAGER_LITE_VERSION "ESP_WiFiManager_Lite v1.4.0"
3241

3342
#ifdef ESP8266
3443

@@ -64,6 +73,17 @@
6473
#include <WiFiMulti.h>
6574
#include <WebServer.h>
6675

76+
// To be sure no LittleFS for ESP32-C3
77+
#if ( ARDUINO_ESP32C3_DEV )
78+
// Currently, ESP32-C3 only supporting SPIFFS and EEPROM. Will fix to support LittleFS
79+
#if USE_LITTLEFS
80+
#undef USE_LITTLEFS
81+
#define USE_LITTLEFS false
82+
#undef USE_SPIFFS
83+
#define USE_SPIFFS true
84+
#endif
85+
#endif
86+
6787
// LittleFS has higher priority than SPIFFS.
6888
// But if not specified any, use SPIFFS to not forcing user to install LITTLEFS library
6989
#if ! (defined(USE_LITTLEFS) || defined(USE_SPIFFS) )

0 commit comments

Comments
 (0)