|
8 | 8 | Forked from Blynk library v0.6.1 https://github.com/blynkkk/blynk-library/releases |
9 | 9 | Built by Khoi Hoang https://github.com/khoih-prog/Blynk_WM |
10 | 10 | Licensed under MIT license |
11 | | - Version: 1.2.0 |
| 11 | + Version: 1.3.0 |
12 | 12 |
|
13 | 13 | Version Modified By Date Comments |
14 | 14 | ------- ----------- ---------- ----------- |
|
34 | 34 | 1.1.2 K Hoang 28/01/2021 Fix Config Portal and Dynamic Params bugs |
35 | 35 | 1.1.3 K Hoang 31/01/2021 To permit autoreset after timeout if DRD/MRD or non-persistent forced-CP |
36 | 36 | 1.2.0 K Hoang 24/02/2021 Add customs HTML header feature and support to ESP32-S2. |
| 37 | + 1.3.0 K Hoang 19/04/2021 Add LittleFS and SPIFFS support to ESP32-S2. Add support to ESP32-C3 without LittleFS |
| 38 | + Fix SSL issue with Blynk Cloud Server |
37 | 39 | *****************************************************************************************************************************/ |
38 | 40 |
|
39 | 41 | // Sketch uses Arduino IDE-selected ESP32 and ESP8266 to select compile choices |
|
86 | 88 | * the BlynkSimpleEsp... and ...WiFiManager libraries, the ESP32 and ESP8266. |
87 | 89 | */ |
88 | 90 |
|
| 91 | +/* |
| 92 | + // To add something similar to this for ESP32-C3 |
| 93 | + #if CONFIG_IDF_TARGET_ESP32 |
| 94 | + const int8_t esp32_adc2gpio[20] = {36, 37, 38, 39, 32, 33, 34, 35, -1, -1, 4, 0, 2, 15, 13, 12, 14, 27, 25, 26}; |
| 95 | + #elif CONFIG_IDF_TARGET_ESP32S2 |
| 96 | + const int8_t esp32_adc2gpio[20] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20}; |
| 97 | + #elif CONFIG_IDF_TARGET_ESP32C3 |
| 98 | + const int8_t esp32_adc2gpio[20] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20}; |
| 99 | + #endif |
| 100 | + */ |
| 101 | + |
| 102 | +#if !( defined(ESP32) || defined(ESP8266) ) |
| 103 | + #error This code is intended to run on the ESP32 platform! Please check your Tools->Board setting. |
| 104 | +#elif ( ARDUINO_ESP32S2_DEV || ARDUINO_FEATHERS2 || ARDUINO_ESP32S2_THING_PLUS || ARDUINO_MICROS2 || \ |
| 105 | + ARDUINO_METRO_ESP32S2 || ARDUINO_MAGTAG29_ESP32S2 || ARDUINO_FUNHOUSE_ESP32S2 || \ |
| 106 | + ARDUINO_ADAFRUIT_FEATHER_ESP32S2_NOPSRAM ) |
| 107 | + #define BOARD_TYPE "ESP32-S2" |
| 108 | +#elif ( ARDUINO_ESP32C3_DEV ) |
| 109 | + // https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-gpio.c |
| 110 | + #warning ESP32-C3 boards not fully supported yet. Only SPIFFS and EEPROM OK. Tempo esp32_adc2gpio to be replaced |
| 111 | + const int8_t esp32_adc2gpio[20] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20}; |
| 112 | + #define BOARD_TYPE "ESP32-C3" |
| 113 | +#else |
| 114 | + #define BOARD_TYPE "ESP32" |
| 115 | +#endif |
| 116 | + |
89 | 117 | #define SERIAL_SPEED 230400 |
90 | 118 | #define SKETCH_NAME "Blynk_WM_Template" |
91 | 119 |
|
|
176 | 204 | // (USE_LITTLEFS == false) and (USE_SPIFFS == true) => using SPIFFS for configuration data in WiFiManager |
177 | 205 | // Those above #define's must be placed before #include <BlynkSimpleEsp32_WFM.h> |
178 | 206 |
|
179 | | - #if ( ARDUINO_ESP32S2_DEV || ARDUINO_FEATHERS2 || ARDUINO_PROS2 || ARDUINO_MICROS2 ) |
180 | | - // Currently, ESP32-S2 only supporting EEPROM. Will fix to support LittleFS and SPIFFS |
| 207 | + #if ( ARDUINO_ESP32C3_DEV ) |
| 208 | + // Currently, ESP32-C3 only supporting SPIFFS and EEPROM. Will fix to support LittleFS |
181 | 209 | #define USE_LITTLEFS false |
182 | | - #define USE_SPIFFS false |
183 | | - #warning ESP32-S2 only support supporting EEPROM now. |
| 210 | + #define USE_SPIFFS true |
184 | 211 | #else |
185 | 212 | #define USE_LITTLEFS true |
186 | 213 | #define USE_SPIFFS false |
|
0 commit comments