Skip to content
This repository was archived by the owner on Nov 25, 2021. It is now read-only.

Commit 9e67714

Browse files
authored
Major Releases v1.3.0
### Major Releases v1.3.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). 3. Fix SSL issue with Blynk Cloud Server 4. Update examples
1 parent 19000e7 commit 9e67714

File tree

30 files changed

+623
-140
lines changed

30 files changed

+623
-140
lines changed

README.md

Lines changed: 295 additions & 44 deletions
Large diffs are not rendered by default.

examples/AM2315_ESP32_SSL/AM2315_ESP32_SSL.ino

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Forked from Blynk library v0.6.1 https://github.com/blynkkk/blynk-library/releases
88
Built by Khoi Hoang https://github.com/khoih-prog/Blynk_WM
99
Licensed under MIT license
10-
Version: 1.2.0
10+
Version: 1.3.0
1111
1212
Version Modified By Date Comments
1313
------- ----------- ---------- -----------
@@ -33,6 +33,8 @@
3333
1.1.2 K Hoang 28/01/2021 Fix Config Portal and Dynamic Params bugs
3434
1.1.3 K Hoang 31/01/2021 To permit autoreset after timeout if DRD/MRD or non-persistent forced-CP
3535
1.2.0 K Hoang 24/02/2021 Add customs HTML header feature and support to ESP32-S2.
36+
1.3.0 K Hoang 19/04/2021 Add LittleFS and SPIFFS support to ESP32-S2. Add support to ESP32-C3 without LittleFS
37+
Fix SSL issue with Blynk Cloud Server
3638
*****************************************************************************************************************************/
3739

3840
#include "defines.h"

examples/AM2315_ESP32_SSL/defines.h

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,33 @@
99
Licensed under MIT license
1010
*****************************************************************************************************************************/
1111

12+
/*
13+
// To add something similar to this for ESP32-C3
14+
#if CONFIG_IDF_TARGET_ESP32
15+
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};
16+
#elif CONFIG_IDF_TARGET_ESP32S2
17+
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};
18+
#elif CONFIG_IDF_TARGET_ESP32C3
19+
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};
20+
#endif
21+
*/
22+
1223
#ifndef defines_h
1324
#define defines_h
1425

15-
#ifndef ESP32
26+
#if !( defined(ESP32) )
1627
#error This code is intended to run on the ESP32 platform! Please check your Tools->Board setting.
28+
#elif ( ARDUINO_ESP32S2_DEV || ARDUINO_FEATHERS2 || ARDUINO_ESP32S2_THING_PLUS || ARDUINO_MICROS2 || \
29+
ARDUINO_METRO_ESP32S2 || ARDUINO_MAGTAG29_ESP32S2 || ARDUINO_FUNHOUSE_ESP32S2 || \
30+
ARDUINO_ADAFRUIT_FEATHER_ESP32S2_NOPSRAM )
31+
#define BOARD_TYPE "ESP32-S2"
32+
#elif ( ARDUINO_ESP32C3_DEV )
33+
// https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-gpio.c
34+
#warning ESP32-C3 boards not fully supported yet. Only SPIFFS and EEPROM OK. Tempo esp32_adc2gpio to be replaced
35+
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};
36+
#define BOARD_TYPE "ESP32-C3"
37+
#else
38+
#define BOARD_TYPE "ESP32"
1739
#endif
1840

1941
#define BLYNK_PRINT Serial
@@ -28,11 +50,10 @@
2850
// (USE_LITTLEFS == false) and (USE_SPIFFS == true) => using SPIFFS for configuration data in WiFiManager
2951
// Those above #define's must be placed before #include <BlynkSimpleEsp32_WFM.h>
3052

31-
#if ( ARDUINO_ESP32S2_DEV || ARDUINO_FEATHERS2 || ARDUINO_PROS2 || ARDUINO_MICROS2 )
32-
// Currently, ESP32-S2 only supporting EEPROM. Will fix to support LittleFS and SPIFFS
53+
#if ( ARDUINO_ESP32C3_DEV )
54+
// Currently, ESP32-C3 only supporting SPIFFS and EEPROM. Will fix to support LittleFS
3355
#define USE_LITTLEFS false
34-
#define USE_SPIFFS false
35-
#warning ESP32-S2 only support supporting EEPROM now.
56+
#define USE_SPIFFS true
3657
#else
3758
#define USE_LITTLEFS true
3859
#define USE_SPIFFS false

examples/AM2315_ESP8266/AM2315_ESP8266.ino

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Forked from Blynk library v0.6.1 https://github.com/blynkkk/blynk-library/releases
88
Built by Khoi Hoang https://github.com/khoih-prog/Blynk_WM
99
Licensed under MIT license
10-
Version: 1.2.0
10+
Version: 1.3.0
1111
1212
Version Modified By Date Comments
1313
------- ----------- ---------- -----------
@@ -33,6 +33,8 @@
3333
1.1.2 K Hoang 28/01/2021 Fix Config Portal and Dynamic Params bugs
3434
1.1.3 K Hoang 31/01/2021 To permit autoreset after timeout if DRD/MRD or non-persistent forced-CP
3535
1.2.0 K Hoang 24/02/2021 Add customs HTML header feature and support to ESP32-S2.
36+
1.3.0 K Hoang 19/04/2021 Add LittleFS and SPIFFS support to ESP32-S2. Add support to ESP32-C3 without LittleFS
37+
Fix SSL issue with Blynk Cloud Server
3638
*****************************************************************************************************************************/
3739

3840
#include "defines.h"

examples/Blynk_WM_Template/Blynk_WM_Template.ino

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
Forked from Blynk library v0.6.1 https://github.com/blynkkk/blynk-library/releases
99
Built by Khoi Hoang https://github.com/khoih-prog/Blynk_WM
1010
Licensed under MIT license
11-
Version: 1.2.0
11+
Version: 1.3.0
1212
1313
Version Modified By Date Comments
1414
------- ----------- ---------- -----------
@@ -34,6 +34,8 @@
3434
1.1.2 K Hoang 28/01/2021 Fix Config Portal and Dynamic Params bugs
3535
1.1.3 K Hoang 31/01/2021 To permit autoreset after timeout if DRD/MRD or non-persistent forced-CP
3636
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
3739
*****************************************************************************************************************************/
3840

3941
// Sketch uses Arduino IDE-selected ESP32 and ESP8266 to select compile choices
@@ -86,6 +88,32 @@
8688
* the BlynkSimpleEsp... and ...WiFiManager libraries, the ESP32 and ESP8266.
8789
*/
8890

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+
89117
#define SERIAL_SPEED 230400
90118
#define SKETCH_NAME "Blynk_WM_Template"
91119

@@ -176,11 +204,10 @@
176204
// (USE_LITTLEFS == false) and (USE_SPIFFS == true) => using SPIFFS for configuration data in WiFiManager
177205
// Those above #define's must be placed before #include <BlynkSimpleEsp32_WFM.h>
178206

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
181209
#define USE_LITTLEFS false
182-
#define USE_SPIFFS false
183-
#warning ESP32-S2 only support supporting EEPROM now.
210+
#define USE_SPIFFS true
184211
#else
185212
#define USE_LITTLEFS true
186213
#define USE_SPIFFS false

examples/DHT11ESP32/DHT11ESP32.ino

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Forked from Blynk library v0.6.1 https://github.com/blynkkk/blynk-library/releases
88
Built by Khoi Hoang https://github.com/khoih-prog/Blynk_WM
99
Licensed under MIT license
10-
Version: 1.2.0
10+
Version: 1.3.0
1111
1212
Version Modified By Date Comments
1313
------- ----------- ---------- -----------
@@ -33,12 +33,14 @@
3333
1.1.2 K Hoang 28/01/2021 Fix Config Portal and Dynamic Params bugs
3434
1.1.3 K Hoang 31/01/2021 To permit autoreset after timeout if DRD/MRD or non-persistent forced-CP
3535
1.2.0 K Hoang 24/02/2021 Add customs HTML header feature and support to ESP32-S2.
36+
1.3.0 K Hoang 19/04/2021 Add LittleFS and SPIFFS support to ESP32-S2. Add support to ESP32-C3 without LittleFS
37+
Fix SSL issue with Blynk Cloud Server
3638
*****************************************************************************************************************************/
3739

3840
#include "defines.h"
3941

4042
#include <Ticker.h>
41-
#include <DHT.h>
43+
#include <DHT.h> // https://github.com/adafruit/DHT-sensor-library
4244

4345
DHT dht(DHT_PIN, DHT_TYPE);
4446
BlynkTimer timer;

examples/DHT11ESP32/defines.h

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,33 @@
99
Licensed under MIT license
1010
*****************************************************************************************************************************/
1111

12+
/*
13+
// To add something similar to this for ESP32-C3
14+
#if CONFIG_IDF_TARGET_ESP32
15+
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};
16+
#elif CONFIG_IDF_TARGET_ESP32S2
17+
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};
18+
#elif CONFIG_IDF_TARGET_ESP32C3
19+
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};
20+
#endif
21+
*/
22+
1223
#ifndef defines_h
1324
#define defines_h
1425

15-
#ifndef ESP32
26+
#if !( defined(ESP32) )
1627
#error This code is intended to run on the ESP32 platform! Please check your Tools->Board setting.
28+
#elif ( ARDUINO_ESP32S2_DEV || ARDUINO_FEATHERS2 || ARDUINO_ESP32S2_THING_PLUS || ARDUINO_MICROS2 || \
29+
ARDUINO_METRO_ESP32S2 || ARDUINO_MAGTAG29_ESP32S2 || ARDUINO_FUNHOUSE_ESP32S2 || \
30+
ARDUINO_ADAFRUIT_FEATHER_ESP32S2_NOPSRAM )
31+
#define BOARD_TYPE "ESP32-S2"
32+
#elif ( ARDUINO_ESP32C3_DEV )
33+
// https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-gpio.c
34+
#warning ESP32-C3 boards not fully supported yet. Only SPIFFS and EEPROM OK. Tempo esp32_adc2gpio to be replaced
35+
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};
36+
#define BOARD_TYPE "ESP32-C3"
37+
#else
38+
#define BOARD_TYPE "ESP32"
1739
#endif
1840

1941
#define BLYNK_PRINT Serial
@@ -28,11 +50,10 @@
2850
// (USE_LITTLEFS == false) and (USE_SPIFFS == true) => using SPIFFS for configuration data in WiFiManager
2951
// Those above #define's must be placed before #include <BlynkSimpleEsp32_WFM.h>
3052

31-
#if ( ARDUINO_ESP32S2_DEV || ARDUINO_FEATHERS2 || ARDUINO_PROS2 || ARDUINO_MICROS2 )
32-
// Currently, ESP32-S2 only supporting EEPROM. Will fix to support LittleFS and SPIFFS
53+
#if ( ARDUINO_ESP32C3_DEV )
54+
// Currently, ESP32-C3 only supporting SPIFFS and EEPROM. Will fix to support LittleFS
3355
#define USE_LITTLEFS false
34-
#define USE_SPIFFS false
35-
#warning ESP32-S2 only support supporting EEPROM now.
56+
#define USE_SPIFFS true
3657
#else
3758
#define USE_LITTLEFS true
3859
#define USE_SPIFFS false

examples/DHT11ESP32_SSL/DHT11ESP32_SSL.ino

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Forked from Blynk library v0.6.1 https://github.com/blynkkk/blynk-library/releases
88
Built by Khoi Hoang https://github.com/khoih-prog/Blynk_WM
99
Licensed under MIT license
10-
Version: 1.2.0
10+
Version: 1.3.0
1111
1212
Version Modified By Date Comments
1313
------- ----------- ---------- -----------
@@ -33,12 +33,14 @@
3333
1.1.2 K Hoang 28/01/2021 Fix Config Portal and Dynamic Params bugs
3434
1.1.3 K Hoang 31/01/2021 To permit autoreset after timeout if DRD/MRD or non-persistent forced-CP
3535
1.2.0 K Hoang 24/02/2021 Add customs HTML header feature and support to ESP32-S2.
36+
1.3.0 K Hoang 19/04/2021 Add LittleFS and SPIFFS support to ESP32-S2. Add support to ESP32-C3 without LittleFS
37+
Fix SSL issue with Blynk Cloud Server
3638
*****************************************************************************************************************************/
3739

3840
#include "defines.h"
3941

4042
#include <Ticker.h>
41-
#include <DHT.h>
43+
#include <DHT.h> // https://github.com/adafruit/DHT-sensor-library
4244

4345
DHT dht(DHT_PIN, DHT_TYPE);
4446
BlynkTimer timer;

examples/DHT11ESP32_SSL/defines.h

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,33 @@
99
Licensed under MIT license
1010
*****************************************************************************************************************************/
1111

12+
/*
13+
// To add something similar to this for ESP32-C3
14+
#if CONFIG_IDF_TARGET_ESP32
15+
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};
16+
#elif CONFIG_IDF_TARGET_ESP32S2
17+
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};
18+
#elif CONFIG_IDF_TARGET_ESP32C3
19+
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};
20+
#endif
21+
*/
22+
1223
#ifndef defines_h
1324
#define defines_h
1425

15-
#ifndef ESP32
26+
#if !( defined(ESP32) )
1627
#error This code is intended to run on the ESP32 platform! Please check your Tools->Board setting.
28+
#elif ( ARDUINO_ESP32S2_DEV || ARDUINO_FEATHERS2 || ARDUINO_ESP32S2_THING_PLUS || ARDUINO_MICROS2 || \
29+
ARDUINO_METRO_ESP32S2 || ARDUINO_MAGTAG29_ESP32S2 || ARDUINO_FUNHOUSE_ESP32S2 || \
30+
ARDUINO_ADAFRUIT_FEATHER_ESP32S2_NOPSRAM )
31+
#define BOARD_TYPE "ESP32-S2"
32+
#elif ( ARDUINO_ESP32C3_DEV )
33+
// https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-gpio.c
34+
#warning ESP32-C3 boards not fully supported yet. Only SPIFFS and EEPROM OK. Tempo esp32_adc2gpio to be replaced
35+
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};
36+
#define BOARD_TYPE "ESP32-C3"
37+
#else
38+
#define BOARD_TYPE "ESP32"
1739
#endif
1840

1941
#define BLYNK_PRINT Serial
@@ -28,11 +50,10 @@
2850
// (USE_LITTLEFS == false) and (USE_SPIFFS == true) => using SPIFFS for configuration data in WiFiManager
2951
// Those above #define's must be placed before #include <BlynkSimpleEsp32_WFM.h>
3052

31-
#if ( ARDUINO_ESP32S2_DEV || ARDUINO_FEATHERS2 || ARDUINO_PROS2 || ARDUINO_MICROS2 )
32-
// Currently, ESP32-S2 only supporting EEPROM. Will fix to support LittleFS and SPIFFS
53+
#if ( ARDUINO_ESP32C3_DEV )
54+
// Currently, ESP32-C3 only supporting SPIFFS and EEPROM. Will fix to support LittleFS
3355
#define USE_LITTLEFS false
34-
#define USE_SPIFFS false
35-
#warning ESP32-S2 only support supporting EEPROM now.
56+
#define USE_SPIFFS true
3657
#else
3758
#define USE_LITTLEFS true
3859
#define USE_SPIFFS false

examples/DHT11ESP8266/DHT11ESP8266.ino

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Forked from Blynk library v0.6.1 https://github.com/blynkkk/blynk-library/releases
88
Built by Khoi Hoang https://github.com/khoih-prog/Blynk_WM
99
Licensed under MIT license
10-
Version: 1.2.0
10+
Version: 1.3.0
1111
1212
Version Modified By Date Comments
1313
------- ----------- ---------- -----------
@@ -33,12 +33,14 @@
3333
1.1.2 K Hoang 28/01/2021 Fix Config Portal and Dynamic Params bugs
3434
1.1.3 K Hoang 31/01/2021 To permit autoreset after timeout if DRD/MRD or non-persistent forced-CP
3535
1.2.0 K Hoang 24/02/2021 Add customs HTML header feature and support to ESP32-S2.
36+
1.3.0 K Hoang 19/04/2021 Add LittleFS and SPIFFS support to ESP32-S2. Add support to ESP32-C3 without LittleFS
37+
Fix SSL issue with Blynk Cloud Server
3638
*****************************************************************************************************************************/
3739

3840
#include "defines.h"
3941

4042
#include <Ticker.h>
41-
#include <DHT.h>
43+
#include <DHT.h> // https://github.com/adafruit/DHT-sensor-library
4244

4345
DHT dht(DHT_PIN, DHT_TYPE);
4446
BlynkTimer timer;

0 commit comments

Comments
 (0)