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

Commit

Permalink
v1.1.0 for ESP32_S2/C3
Browse files Browse the repository at this point in the history
#### Releases v1.1.0

1. Add support to `ESP32_S2/C3` boards using `LwIP W5500 Ethernet`.
  • Loading branch information
khoih-prog authored Dec 23, 2022
1 parent 3c39a9b commit b26643a
Show file tree
Hide file tree
Showing 17 changed files with 170 additions and 73 deletions.
Binary file added Images/ESP32S2_DEV.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/ESP32_C3_DevKitC_02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
## Table of contents

* [Changelog](#changelog)
* [Releases v1.1.0](#releases-v110)
* [Releases v1.0.0](#releases-v100)


Expand All @@ -25,6 +26,10 @@

## Changelog

#### Releases v1.1.0

1. Add support to `ESP32_S2/C3` boards using `LwIP W5500 Ethernet`.

#### Releases v1.0.0

1. Initial coding to port [ESPAsync_WiFiManager](https://github.com/khoih-prog/ESPAsync_WiFiManager) to ESP32_S3 boards using `LwIP W5500 Ethernet`.
Expand Down
26 changes: 19 additions & 7 deletions examples/Async_ConfigOnDoubleReset/Async_ConfigOnDoubleReset.ino
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*****************************************************************************************************************************/

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

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

//////////////////////////////////////////////////////////

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

// For ESP32_C3
// Optional values to override default settings
// Don't change unless you know what you're doing
//#define ETH_SPI_HOST SPI2_HOST
//#define SPI_CLOCK_MHZ 25

// Must connect INT to GPIOxx or not working
//#define INT_GPIO 10

//#define MISO_GPIO 5
//#define MOSI_GPIO 6
//#define SCK_GPIO 4
//#define CS_GPIO 7

//////////////////////////////////////////////////////////

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

bool configDataLoaded = false;

if (loadConfigData())
{
configDataLoaded = true;

AsyncESP32_SC_W5500_manager.setConfigPortalTimeout(
120); //If no access point name has been previously entered disable timeout.
//If no access point name has been previously entered disable timeout.
AsyncESP32_SC_W5500_manager.setConfigPortalTimeout(120);

Serial.println(F("Got stored Credentials. Timeout 120s for Config Portal"));

#if USE_ESP_ETH_MANAGER_NTP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ byte mac[][NUMBER_OF_MAC] =

//////////////////////////////////////////////////////////

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

// For ESP32_C3
// Optional values to override default settings
// Don't change unless you know what you're doing
//#define ETH_SPI_HOST SPI2_HOST
//#define SPI_CLOCK_MHZ 25

// Must connect INT to GPIOxx or not working
//#define INT_GPIO 10

//#define MISO_GPIO 5
//#define MOSI_GPIO 6
//#define SCK_GPIO 4
//#define CS_GPIO 7

//////////////////////////////////////////////////////////

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

bool configDataLoaded = false;

if (loadConfigData())
{
configDataLoaded = true;

AsyncESP32_SC_W5500_manager.setConfigPortalTimeout(
120); //If no access point name has been previously entered disable timeout.
//If no access point name has been previously entered disable timeout.
AsyncESP32_SC_W5500_manager.setConfigPortalTimeout(120);

Serial.println(F("Got stored Credentials. Timeout 120s for Config Portal"));

#if USE_ESP_ETH_MANAGER_NTP
Expand Down
33 changes: 23 additions & 10 deletions examples/Async_ConfigOnSwitch/Async_ConfigOnSwitch.ino
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ byte mac[][NUMBER_OF_MAC] =

//////////////////////////////////////////////////////////

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

// For ESP32_C3
// Optional values to override default settings
// Don't change unless you know what you're doing
//#define ETH_SPI_HOST SPI2_HOST
//#define SPI_CLOCK_MHZ 25

// Must connect INT to GPIOxx or not working
//#define INT_GPIO 10

//#define MISO_GPIO 5
//#define MOSI_GPIO 6
//#define SCK_GPIO 4
//#define CS_GPIO 7

//////////////////////////////////////////////////////////

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

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

//////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -687,14 +702,11 @@ void setup()
AsyncESP32_SC_W5500_manager.setCORSHeader("Your Access-Control-Allow-Origin");
#endif

bool configDataLoaded = false;

if (loadConfigData())
{
configDataLoaded = true;

AsyncESP32_SC_W5500_manager.setConfigPortalTimeout(
120); //If no access point name has been previously entered disable timeout.
//If no access point name has been previously entered disable timeout.
AsyncESP32_SC_W5500_manager.setConfigPortalTimeout(120);

Serial.println(F("Got stored Credentials. Timeout 120s for Config Portal"));

#if USE_ESP_ETH_MANAGER_NTP
Expand Down Expand Up @@ -840,8 +852,9 @@ void loop()

if (loadConfigData())
{
AsyncESP32_SC_W5500_manager.setConfigPortalTimeout(
120); //If no access point name has been previously entered disable timeout.
//If no access point name has been previously entered disable timeout.
AsyncESP32_SC_W5500_manager.setConfigPortalTimeout(120);

Serial.println(F("Got stored Credentials. Timeout 120s for Config Portal"));
}
else
Expand Down
35 changes: 24 additions & 11 deletions examples/Async_ConfigOnSwitchFS/Async_ConfigOnSwitchFS.ino
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ byte mac[][NUMBER_OF_MAC] =

//////////////////////////////////////////////////////////

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

// For ESP32_C3
// Optional values to override default settings
// Don't change unless you know what you're doing
//#define ETH_SPI_HOST SPI2_HOST
//#define SPI_CLOCK_MHZ 25

// Must connect INT to GPIOxx or not working
//#define INT_GPIO 10

//#define MISO_GPIO 5
//#define MOSI_GPIO 6
//#define SCK_GPIO 4
//#define CS_GPIO 7

//////////////////////////////////////////////////////////

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

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

bool configDataLoaded = false;

if (loadConfigData())
{
configDataLoaded = true;

AsyncESP32_SC_W5500_manager.setConfigPortalTimeout(
120); //If no access point name has been previously entered disable timeout.
//If no access point name has been previously entered disable timeout.
AsyncESP32_SC_W5500_manager.setConfigPortalTimeout(120);

Serial.println(F("Got stored Credentials. Timeout 120s for Config Portal"));

#if USE_ESP_ETH_MANAGER_NTP
Expand Down Expand Up @@ -991,8 +1003,9 @@ void loop()

if (loadConfigData())
{
AsyncESP32_SC_W5500_manager.setConfigPortalTimeout(
120); //If no access point name has been previously entered disable timeout.
//If no access point name has been previously entered disable timeout.
AsyncESP32_SC_W5500_manager.setConfigPortalTimeout(120);

Serial.println(F("Got stored Credentials. Timeout 120s for Config Portal"));
}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ byte mac[][NUMBER_OF_MAC] =

//////////////////////////////////////////////////////////

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

// For ESP32_C3
// Optional values to override default settings
// Don't change unless you know what you're doing
//#define ETH_SPI_HOST SPI2_HOST
//#define SPI_CLOCK_MHZ 25

// Must connect INT to GPIOxx or not working
//#define INT_GPIO 10

//#define MISO_GPIO 5
//#define MOSI_GPIO 6
//#define SCK_GPIO 4
//#define CS_GPIO 7

//////////////////////////////////////////////////////////

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

//////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -786,14 +801,11 @@ void setup()
AsyncESP32_SC_W5500_manager.setCORSHeader("Your Access-Control-Allow-Origin");
#endif

bool configDataLoaded = false;

if (loadConfigData())
{
configDataLoaded = true;

AsyncESP32_SC_W5500_manager.setConfigPortalTimeout(
120); //If no access point name has been previously entered disable timeout.
//If no access point name has been previously entered disable timeout.
AsyncESP32_SC_W5500_manager.setConfigPortalTimeout(120);

Serial.println(F("Got stored Credentials. Timeout 120s for Config Portal"));

#if USE_ESP_ETH_MANAGER_NTP
Expand Down Expand Up @@ -922,8 +934,9 @@ void loop()

if (loadConfigData())
{
AsyncESP32_SC_W5500_manager.setConfigPortalTimeout(
120); //If no access point name has been previously entered disable timeout.
//If no access point name has been previously entered disable timeout.
AsyncESP32_SC_W5500_manager.setConfigPortalTimeout(120);

Serial.println(F("Got stored Credentials. Timeout 120s for Config Portal"));
}
else
Expand Down
15 changes: 15 additions & 0 deletions examples/Async_ESP32_FSWebServer/Async_ESP32_FSWebServer.ino
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ byte mac[][NUMBER_OF_MAC] =

//////////////////////////////////////////////////////////

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

// For ESP32_C3
// Optional values to override default settings
// Don't change unless you know what you're doing
//#define ETH_SPI_HOST SPI2_HOST
//#define SPI_CLOCK_MHZ 25

// Must connect INT to GPIOxx or not working
//#define INT_GPIO 10

//#define MISO_GPIO 5
//#define MOSI_GPIO 6
//#define SCK_GPIO 4
//#define CS_GPIO 7

//////////////////////////////////////////////////////////

#include <ESPmDNS.h>
Expand Down
Loading

0 comments on commit b26643a

Please sign in to comment.