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

Commit b26643a

Browse files
authored
v1.1.0 for ESP32_S2/C3
#### Releases v1.1.0 1. Add support to `ESP32_S2/C3` boards using `LwIP W5500 Ethernet`.
1 parent 3c39a9b commit b26643a

17 files changed

+170
-73
lines changed

Images/ESP32S2_DEV.png

352 KB
Loading

Images/ESP32_C3_DevKitC_02.png

205 KB
Loading

changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
## Table of contents
1717

1818
* [Changelog](#changelog)
19+
* [Releases v1.1.0](#releases-v110)
1920
* [Releases v1.0.0](#releases-v100)
2021

2122

@@ -25,6 +26,10 @@
2526

2627
## Changelog
2728

29+
#### Releases v1.1.0
30+
31+
1. Add support to `ESP32_S2/C3` boards using `LwIP W5500 Ethernet`.
32+
2833
#### Releases v1.0.0
2934

3035
1. Initial coding to port [ESPAsync_WiFiManager](https://github.com/khoih-prog/ESPAsync_WiFiManager) to ESP32_S3 boards using `LwIP W5500 Ethernet`.

examples/Async_ConfigOnDoubleReset/Async_ConfigOnDoubleReset.ino

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*****************************************************************************************************************************/
2727

2828
#if !( defined(ESP32) )
29-
#error This code is designed for (SP32_S2/3, ESP32_C3 + W5500) to run on ESP32 platform! Please check your Tools->Board setting.
29+
#error This code is designed for (ESP32_S2/3, ESP32_C3 + W5500) to run on ESP32 platform! Please check your Tools->Board setting.
3030
#endif
3131

3232
// Use from 0 to 4. Higher number, more debugging messages and memory usage.
@@ -67,6 +67,7 @@ byte mac[][NUMBER_OF_MAC] =
6767

6868
//////////////////////////////////////////////////////////
6969

70+
// For ESP32-S3
7071
// Optional values to override default settings
7172
// Don't change unless you know what you're doing
7273
//#define ETH_SPI_HOST SPI3_HOST
@@ -80,6 +81,20 @@ byte mac[][NUMBER_OF_MAC] =
8081
//#define SCK_GPIO 12
8182
//#define CS_GPIO 10
8283

84+
// For ESP32_C3
85+
// Optional values to override default settings
86+
// Don't change unless you know what you're doing
87+
//#define ETH_SPI_HOST SPI2_HOST
88+
//#define SPI_CLOCK_MHZ 25
89+
90+
// Must connect INT to GPIOxx or not working
91+
//#define INT_GPIO 10
92+
93+
//#define MISO_GPIO 5
94+
//#define MOSI_GPIO 6
95+
//#define SCK_GPIO 4
96+
//#define CS_GPIO 7
97+
8398
//////////////////////////////////////////////////////////
8499

85100
#include <FS.h>
@@ -588,14 +603,11 @@ void setup()
588603
AsyncESP32_SC_W5500_manager.setCORSHeader("Your Access-Control-Allow-Origin");
589604
#endif
590605

591-
bool configDataLoaded = false;
592-
593606
if (loadConfigData())
594607
{
595-
configDataLoaded = true;
596-
597-
AsyncESP32_SC_W5500_manager.setConfigPortalTimeout(
598-
120); //If no access point name has been previously entered disable timeout.
608+
//If no access point name has been previously entered disable timeout.
609+
AsyncESP32_SC_W5500_manager.setConfigPortalTimeout(120);
610+
599611
Serial.println(F("Got stored Credentials. Timeout 120s for Config Portal"));
600612

601613
#if USE_ESP_ETH_MANAGER_NTP

examples/Async_ConfigOnDoubleReset_TZ/Async_ConfigOnDoubleReset_TZ.ino

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ byte mac[][NUMBER_OF_MAC] =
6767

6868
//////////////////////////////////////////////////////////
6969

70+
// For ESP32-S3
7071
// Optional values to override default settings
7172
// Don't change unless you know what you're doing
7273
//#define ETH_SPI_HOST SPI3_HOST
@@ -80,6 +81,20 @@ byte mac[][NUMBER_OF_MAC] =
8081
//#define SCK_GPIO 12
8182
//#define CS_GPIO 10
8283

84+
// For ESP32_C3
85+
// Optional values to override default settings
86+
// Don't change unless you know what you're doing
87+
//#define ETH_SPI_HOST SPI2_HOST
88+
//#define SPI_CLOCK_MHZ 25
89+
90+
// Must connect INT to GPIOxx or not working
91+
//#define INT_GPIO 10
92+
93+
//#define MISO_GPIO 5
94+
//#define MOSI_GPIO 6
95+
//#define SCK_GPIO 4
96+
//#define CS_GPIO 7
97+
8398
//////////////////////////////////////////////////////////
8499

85100
#include <FS.h>
@@ -624,14 +639,11 @@ void setup()
624639
AsyncESP32_SC_W5500_manager.setCORSHeader("Your Access-Control-Allow-Origin");
625640
#endif
626641

627-
bool configDataLoaded = false;
628-
629642
if (loadConfigData())
630643
{
631-
configDataLoaded = true;
632-
633-
AsyncESP32_SC_W5500_manager.setConfigPortalTimeout(
634-
120); //If no access point name has been previously entered disable timeout.
644+
//If no access point name has been previously entered disable timeout.
645+
AsyncESP32_SC_W5500_manager.setConfigPortalTimeout(120);
646+
635647
Serial.println(F("Got stored Credentials. Timeout 120s for Config Portal"));
636648

637649
#if USE_ESP_ETH_MANAGER_NTP

examples/Async_ConfigOnSwitch/Async_ConfigOnSwitch.ino

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ byte mac[][NUMBER_OF_MAC] =
6565

6666
//////////////////////////////////////////////////////////
6767

68+
// For ESP32-S3
6869
// Optional values to override default settings
6970
// Don't change unless you know what you're doing
7071
//#define ETH_SPI_HOST SPI3_HOST
@@ -78,6 +79,20 @@ byte mac[][NUMBER_OF_MAC] =
7879
//#define SCK_GPIO 12
7980
//#define CS_GPIO 10
8081

82+
// For ESP32_C3
83+
// Optional values to override default settings
84+
// Don't change unless you know what you're doing
85+
//#define ETH_SPI_HOST SPI2_HOST
86+
//#define SPI_CLOCK_MHZ 25
87+
88+
// Must connect INT to GPIOxx or not working
89+
//#define INT_GPIO 10
90+
91+
//#define MISO_GPIO 5
92+
//#define MOSI_GPIO 6
93+
//#define SCK_GPIO 4
94+
//#define CS_GPIO 7
95+
8196
//////////////////////////////////////////////////////////
8297

8398
//For ESP32, To use ESP32 Dev Module, QIO, Flash 4MB/80MHz, Upload 921600
@@ -219,12 +234,12 @@ byte mac[][NUMBER_OF_MAC] =
219234
const int TRIGGER_PIN2 = PIN_D4; // Pin D4 mapped to pin GPIO04/ADC1_3/TOUCH4 of ESP32-S2
220235

221236
#else
222-
const int TRIGGER_PIN = PIN_D0; // Pin D0 mapped to pin GPIO0/BOOT/ADC11/TOUCH1 of ESP32
237+
const int TRIGGER_PIN = PIN_D0; // Pin D0 mapped to pin GPIO0/BOOT of ESP32_S3
223238
/*
224239
Alternative trigger pin. Needs to be connected to a button to use this pin. It must be a momentary connection
225240
not connected permanently to ground. Either trigger pin will work.
226241
*/
227-
const int TRIGGER_PIN2 = PIN_D25; // Pin D25 mapped to pin GPIO25/ADC18/DAC1 of ESP32
242+
const int TRIGGER_PIN2 = PIN_D7; // Pin D7 mapped to pin GPIO7/ADC1_6/TOUCH7 of ESP32_S3
228243
#endif
229244

230245
//////////////////////////////////////////////////////////////
@@ -687,14 +702,11 @@ void setup()
687702
AsyncESP32_SC_W5500_manager.setCORSHeader("Your Access-Control-Allow-Origin");
688703
#endif
689704

690-
bool configDataLoaded = false;
691-
692705
if (loadConfigData())
693706
{
694-
configDataLoaded = true;
695-
696-
AsyncESP32_SC_W5500_manager.setConfigPortalTimeout(
697-
120); //If no access point name has been previously entered disable timeout.
707+
//If no access point name has been previously entered disable timeout.
708+
AsyncESP32_SC_W5500_manager.setConfigPortalTimeout(120);
709+
698710
Serial.println(F("Got stored Credentials. Timeout 120s for Config Portal"));
699711

700712
#if USE_ESP_ETH_MANAGER_NTP
@@ -840,8 +852,9 @@ void loop()
840852

841853
if (loadConfigData())
842854
{
843-
AsyncESP32_SC_W5500_manager.setConfigPortalTimeout(
844-
120); //If no access point name has been previously entered disable timeout.
855+
//If no access point name has been previously entered disable timeout.
856+
AsyncESP32_SC_W5500_manager.setConfigPortalTimeout(120);
857+
845858
Serial.println(F("Got stored Credentials. Timeout 120s for Config Portal"));
846859
}
847860
else

examples/Async_ConfigOnSwitchFS/Async_ConfigOnSwitchFS.ino

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ byte mac[][NUMBER_OF_MAC] =
7878

7979
//////////////////////////////////////////////////////////
8080

81+
// For ESP32-S3
8182
// Optional values to override default settings
8283
// Don't change unless you know what you're doing
8384
//#define ETH_SPI_HOST SPI3_HOST
@@ -91,6 +92,20 @@ byte mac[][NUMBER_OF_MAC] =
9192
//#define SCK_GPIO 12
9293
//#define CS_GPIO 10
9394

95+
// For ESP32_C3
96+
// Optional values to override default settings
97+
// Don't change unless you know what you're doing
98+
//#define ETH_SPI_HOST SPI2_HOST
99+
//#define SPI_CLOCK_MHZ 25
100+
101+
// Must connect INT to GPIOxx or not working
102+
//#define INT_GPIO 10
103+
104+
//#define MISO_GPIO 5
105+
//#define MOSI_GPIO 6
106+
//#define SCK_GPIO 4
107+
//#define CS_GPIO 7
108+
94109
//////////////////////////////////////////////////////////
95110

96111
#include <FS.h>
@@ -227,15 +242,15 @@ byte mac[][NUMBER_OF_MAC] =
227242
Flash button is convenient to use but if it is pressed it will stuff up the serial port device driver
228243
until the computer is rebooted on windows machines.
229244
*/
230-
const int TRIGGER_PIN = PIN_D0; // Pin D0 mapped to pin GPIO0/BOOT/ADC11/TOUCH1 of ESP32
245+
const int TRIGGER_PIN = PIN_D0; // Pin D0 mapped to pin GPIO0/BOOT of ESP32_S3
231246
/*
232247
Alternative trigger pin. Needs to be connected to a button to use this pin. It must be a momentary connection
233248
not connected permanently to ground. Either trigger pin will work.
234249
*/
235250
#if ( ARDUINO_ESP32C3_DEV )
236-
const int TRIGGER_PIN2 = PIN_D8; // Pin D8 mapped to pin GPIO8/FLASH_D1 of ESP32
251+
const int TRIGGER_PIN2 = PIN_D8; // Pin D8 mapped to pin GPIO8/FLASH_D1 of ESP32
237252
#else
238-
const int TRIGGER_PIN2 = PIN_D25; // Pin D25 mapped to pin GPIO25/ADC18/DAC1 of ESP32
253+
const int TRIGGER_PIN2 = PIN_D7; // Pin D7 mapped to pin GPIO7/ADC1_6/TOUCH7 of ESP32_S3
239254
#endif
240255

241256
int pinSda = PIN_SDA; // Pin SDA mapped to pin GPIO21/SDA of ESP32
@@ -855,14 +870,11 @@ void setup()
855870
AsyncESP32_SC_W5500_manager.setCORSHeader("Your Access-Control-Allow-Origin");
856871
#endif
857872

858-
bool configDataLoaded = false;
859-
860873
if (loadConfigData())
861874
{
862-
configDataLoaded = true;
863-
864-
AsyncESP32_SC_W5500_manager.setConfigPortalTimeout(
865-
120); //If no access point name has been previously entered disable timeout.
875+
//If no access point name has been previously entered disable timeout.
876+
AsyncESP32_SC_W5500_manager.setConfigPortalTimeout(120);
877+
866878
Serial.println(F("Got stored Credentials. Timeout 120s for Config Portal"));
867879

868880
#if USE_ESP_ETH_MANAGER_NTP
@@ -991,8 +1003,9 @@ void loop()
9911003

9921004
if (loadConfigData())
9931005
{
994-
AsyncESP32_SC_W5500_manager.setConfigPortalTimeout(
995-
120); //If no access point name has been previously entered disable timeout.
1006+
//If no access point name has been previously entered disable timeout.
1007+
AsyncESP32_SC_W5500_manager.setConfigPortalTimeout(120);
1008+
9961009
Serial.println(F("Got stored Credentials. Timeout 120s for Config Portal"));
9971010
}
9981011
else

examples/Async_ConfigPortalParamsOnSwitch/Async_ConfigPortalParamsOnSwitch.ino

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ byte mac[][NUMBER_OF_MAC] =
6666

6767
//////////////////////////////////////////////////////////
6868

69+
// For ESP32-S3
6970
// Optional values to override default settings
7071
// Don't change unless you know what you're doing
7172
//#define ETH_SPI_HOST SPI3_HOST
@@ -79,6 +80,20 @@ byte mac[][NUMBER_OF_MAC] =
7980
//#define SCK_GPIO 12
8081
//#define CS_GPIO 10
8182

83+
// For ESP32_C3
84+
// Optional values to override default settings
85+
// Don't change unless you know what you're doing
86+
//#define ETH_SPI_HOST SPI2_HOST
87+
//#define SPI_CLOCK_MHZ 25
88+
89+
// Must connect INT to GPIOxx or not working
90+
//#define INT_GPIO 10
91+
92+
//#define MISO_GPIO 5
93+
//#define MOSI_GPIO 6
94+
//#define SCK_GPIO 4
95+
//#define CS_GPIO 7
96+
8297
//////////////////////////////////////////////////////////
8398

8499
#include <FS.h>
@@ -212,15 +227,15 @@ byte mac[][NUMBER_OF_MAC] =
212227
Flash button is convenient to use but if it is pressed it will stuff up the serial port device driver
213228
until the computer is rebooted on windows machines.
214229
*/
215-
const int TRIGGER_PIN = PIN_D0; // Pin D0 mapped to pin GPIO0/BOOT/ADC11/TOUCH1 of ESP32
230+
const int TRIGGER_PIN = PIN_D0; // Pin D0 mapped to pin GPIO0/BOOT of ESP32_S3
216231
/*
217232
Alternative trigger pin. Needs to be connected to a button to use this pin. It must be a momentary connection
218233
not connected permanently to ground. Either trigger pin will work.
219234
*/
220235
#if ( ARDUINO_ESP32C3_DEV )
221-
const int TRIGGER_PIN2 = PIN_D8; // Pin D8 mapped to pin GPIO8/FLASH_D1 of ESP32
236+
const int TRIGGER_PIN2 = PIN_D8; // Pin D8 mapped to pin GPIO8/FLASH_D1 of ESP32
222237
#else
223-
const int TRIGGER_PIN2 = PIN_D25; // Pin D25 mapped to pin GPIO25/ADC18/DAC1 of ESP32
238+
const int TRIGGER_PIN2 = PIN_D7; // Pin D7 mapped to pin GPIO7/ADC1_6/TOUCH7 of ESP32_S3
224239
#endif
225240

226241
//////////////////////////////////////////////////////////////
@@ -786,14 +801,11 @@ void setup()
786801
AsyncESP32_SC_W5500_manager.setCORSHeader("Your Access-Control-Allow-Origin");
787802
#endif
788803

789-
bool configDataLoaded = false;
790-
791804
if (loadConfigData())
792805
{
793-
configDataLoaded = true;
794-
795-
AsyncESP32_SC_W5500_manager.setConfigPortalTimeout(
796-
120); //If no access point name has been previously entered disable timeout.
806+
//If no access point name has been previously entered disable timeout.
807+
AsyncESP32_SC_W5500_manager.setConfigPortalTimeout(120);
808+
797809
Serial.println(F("Got stored Credentials. Timeout 120s for Config Portal"));
798810

799811
#if USE_ESP_ETH_MANAGER_NTP
@@ -922,8 +934,9 @@ void loop()
922934

923935
if (loadConfigData())
924936
{
925-
AsyncESP32_SC_W5500_manager.setConfigPortalTimeout(
926-
120); //If no access point name has been previously entered disable timeout.
937+
//If no access point name has been previously entered disable timeout.
938+
AsyncESP32_SC_W5500_manager.setConfigPortalTimeout(120);
939+
927940
Serial.println(F("Got stored Credentials. Timeout 120s for Config Portal"));
928941
}
929942
else

examples/Async_ESP32_FSWebServer/Async_ESP32_FSWebServer.ino

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ byte mac[][NUMBER_OF_MAC] =
6969

7070
//////////////////////////////////////////////////////////
7171

72+
// For ESP32-S3
7273
// Optional values to override default settings
7374
// Don't change unless you know what you're doing
7475
//#define ETH_SPI_HOST SPI3_HOST
@@ -82,6 +83,20 @@ byte mac[][NUMBER_OF_MAC] =
8283
//#define SCK_GPIO 12
8384
//#define CS_GPIO 10
8485

86+
// For ESP32_C3
87+
// Optional values to override default settings
88+
// Don't change unless you know what you're doing
89+
//#define ETH_SPI_HOST SPI2_HOST
90+
//#define SPI_CLOCK_MHZ 25
91+
92+
// Must connect INT to GPIOxx or not working
93+
//#define INT_GPIO 10
94+
95+
//#define MISO_GPIO 5
96+
//#define MOSI_GPIO 6
97+
//#define SCK_GPIO 4
98+
//#define CS_GPIO 7
99+
85100
//////////////////////////////////////////////////////////
86101

87102
#include <ESPmDNS.h>

0 commit comments

Comments
 (0)