├── pics ├── Main.png ├── Saved.png ├── ConfigPortal.png ├── Default_Main.png ├── PortalAuth.jpg ├── esp32_s2_tools.png ├── Input_With_Scan.png ├── esp32_s2_esptool.png ├── esp32_s2_Toolchain.png ├── esp32_s2_Core_Unzipped.png └── Blynk_Async_ESP32_C3_Support.png ├── .github ├── workflows │ └── auto-github-actions.yml └── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md ├── LICENSE ├── examples ├── Async_Blynk_WM_Template │ ├── MY_WIFI_CREDENTIALS.h │ ├── MY_BLYNK_CREDENTIALS.h │ ├── MY_BLYNK_COLORS.h │ ├── ESP_LED_BUILTINS.h │ └── README.md ├── ESP32_MultiTask │ ├── Async_ESP32_MultiTask │ │ ├── bmp.h │ │ ├── Credentials.h │ │ ├── dynamicParams.h │ │ └── defines.h │ ├── AsyncMT_DHT11ESP32 │ │ ├── Credentials.h │ │ └── dynamicParams.h │ ├── AsyncMT_DHT11ESP32_SSL │ │ ├── Credentials.h │ │ └── dynamicParams.h │ ├── AsyncMT_ESP32WM_Config │ │ ├── Credentials.h │ │ ├── dynamicParams.h │ │ └── defines.h │ ├── AsyncMT_AM2315_ESP32_SSL │ │ ├── Credentials.h │ │ └── dynamicParams.h │ └── AsyncMT_ESP32WM_ForcedConfig │ │ ├── Credentials.h │ │ ├── dynamicParams.h │ │ └── defines.h ├── Async_DHT11ESP32 │ ├── Credentials.h │ └── dynamicParams.h ├── Async_AM2315_ESP8266 │ ├── Credentials.h │ ├── dynamicParams.h │ └── defines.h ├── Async_DHT11ESP32_SSL │ ├── Credentials.h │ └── dynamicParams.h ├── Async_DHT11ESP8266 │ ├── Credentials.h │ ├── dynamicParams.h │ └── defines.h ├── Async_DHT11ESP8266_SSL │ ├── Credentials.h │ ├── dynamicParams.h │ └── defines.h ├── Async_ESP32WM_Config │ ├── Credentials.h │ ├── dynamicParams.h │ └── defines.h ├── Async_AM2315_ESP32_SSL │ ├── Credentials.h │ └── dynamicParams.h ├── Async_DHT11ESP8266_Debug │ ├── Credentials.h │ ├── dynamicParams.h │ └── defines.h ├── Async_ESP32WM_ForcedConfig │ ├── Credentials.h │ ├── dynamicParams.h │ └── defines.h ├── Async_ESP32WM_MRD_Config │ ├── Credentials.h │ └── dynamicParams.h ├── Async_ESP32WM_MRD_ForcedConfig │ ├── Credentials.h │ └── dynamicParams.h ├── Async_ESP8266WM_Config │ ├── Credentials.h │ ├── dynamicParams.h │ └── defines.h ├── Async_ESP8266WM_ForcedConfig │ ├── Credentials.h │ ├── dynamicParams.h │ └── defines.h ├── Async_ESP8266WM_MRD_Config │ ├── Credentials.h │ ├── dynamicParams.h │ └── defines.h └── Async_ESP8266WM_MRD_ForcedConfig │ ├── Credentials.h │ ├── dynamicParams.h │ └── defines.h ├── library.properties ├── CONTRIBUTING.md ├── library.json ├── platformio └── platformio.ini └── keywords.txt /pics/Main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khoih-prog/Blynk_Async_WM/HEAD/pics/Main.png -------------------------------------------------------------------------------- /pics/Saved.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khoih-prog/Blynk_Async_WM/HEAD/pics/Saved.png -------------------------------------------------------------------------------- /pics/ConfigPortal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khoih-prog/Blynk_Async_WM/HEAD/pics/ConfigPortal.png -------------------------------------------------------------------------------- /pics/Default_Main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khoih-prog/Blynk_Async_WM/HEAD/pics/Default_Main.png -------------------------------------------------------------------------------- /pics/PortalAuth.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khoih-prog/Blynk_Async_WM/HEAD/pics/PortalAuth.jpg -------------------------------------------------------------------------------- /pics/esp32_s2_tools.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khoih-prog/Blynk_Async_WM/HEAD/pics/esp32_s2_tools.png -------------------------------------------------------------------------------- /pics/Input_With_Scan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khoih-prog/Blynk_Async_WM/HEAD/pics/Input_With_Scan.png -------------------------------------------------------------------------------- /pics/esp32_s2_esptool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khoih-prog/Blynk_Async_WM/HEAD/pics/esp32_s2_esptool.png -------------------------------------------------------------------------------- /pics/esp32_s2_Toolchain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khoih-prog/Blynk_Async_WM/HEAD/pics/esp32_s2_Toolchain.png -------------------------------------------------------------------------------- /pics/esp32_s2_Core_Unzipped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khoih-prog/Blynk_Async_WM/HEAD/pics/esp32_s2_Core_Unzipped.png -------------------------------------------------------------------------------- /pics/Blynk_Async_ESP32_C3_Support.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khoih-prog/Blynk_Async_WM/HEAD/pics/Blynk_Async_ESP32_C3_Support.png -------------------------------------------------------------------------------- /.github/workflows/auto-github-actions.yml: -------------------------------------------------------------------------------- 1 | name: auto-github-actions 2 | on: [push] 3 | jobs: 4 | check-bats-version: 5 | runs-on: ubuntu-latest 6 | steps: 7 | - uses: actions/checkout@v2 8 | - uses: actions/setup-node@v2 9 | with: 10 | node-version: '14' 11 | - run: npm install -g bats 12 | - run: bats -v 13 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | ### Is your feature request related to a problem? Please describe. 11 | 12 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 13 | 14 | ### Describe the solution you'd like 15 | 16 | A clear and concise description of what you want to happen. 17 | 18 | ### Describe alternatives you've considered 19 | 20 | A clear and concise description of any alternative solutions or features you've considered. 21 | 22 | ### Additional context 23 | 24 | Add any other context or screenshots about the feature request here. 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Khoi Hoang 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /examples/Async_Blynk_WM_Template/MY_WIFI_CREDENTIALS.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | MY_WIFI_CREDENTIALS.h Blynk_WM_Template.ino 3 | For ESP32/ESP8266 boards 4 | Written by Thor Johnson (https://github.com/thorathome) May 2020 as a template for 5 | Blynk Wifi ESP communications. See https://github.com/thorathome/Blynk_Examples 6 | 7 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 8 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 9 | 10 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 11 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 12 | Licensed under MIT license 13 | ********************************************************************************************************************************/ 14 | 15 | #ifndef MY_WIFI_CREDENTIALS_h 16 | #define MY_WIFI_CREDENTIALS_h 17 | 18 | #define MY_WIFI_SSID "my_wifi_ssid" 19 | #define MY_WIFI_PASSWORD "my_wifi_password" 20 | 21 | #endif //MY_WIFI_CREDENTIALS_h 22 | -------------------------------------------------------------------------------- /examples/Async_Blynk_WM_Template/MY_BLYNK_CREDENTIALS.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | MY_BLYNK_CREDENTIALS.h Blynk_WM_Template.ino 3 | For ESP32/ESP8266 boards 4 | Written by Thor Johnson (https://github.com/thorathome) May 2020 as a template for 5 | Blynk Wifi ESP communications. See https://github.com/thorathome/Blynk_Examples 6 | 7 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 8 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 9 | 10 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 11 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 12 | Licensed under MIT license 13 | ********************************************************************************************************************************/ 14 | 15 | #ifndef MY_BLYNK_CREDENTIALS_h 16 | #define MY_BLYNK_CREDENTIALS_h 17 | 18 | #define MY_BLYNK_SERVER "blynk-cloud.com" 19 | #define MY_WM_TEMPLATE_AUTHCODE "0123456789abcdef0123456789abcdef" 20 | 21 | #endif //MY_BLYNK_CREDENTIALS_h 22 | -------------------------------------------------------------------------------- /library.properties: -------------------------------------------------------------------------------- 1 | name=Blynk_Async_WM 2 | version=1.6.2 3 | author=Khoi Hoang 4 | license=MIT 5 | maintainer=Khoi Hoang 6 | sentence=Simple Async WiFiManager for Blynk and ESP32 (including ESP32-S2, ESP32-C3), ESP8266 with or without SSL, configuration data saved in either LittleFS, SPIFFS or EEPROM. Now working with new ESP8266 core v3.0.1 and ESP32 core v1.0.6 7 | paragraph=Library, using AsyncWebServer instead of (ESP8266)WebServer, for configuring/auto(re)connecting ESP32 (including ESP32-S2, ESP32-C3), ESP8266 modules to best or available MultiWiFi APs and MultiBlynk servers at runtime. Enable adding dynamic custom parameters from sketch and input using the same Config Portal (CP). CP will be auto-adjusted to match the number of dynamic parameters. Optional default Credentials to be autoloaded into CP to use or change instead of manually input. Static STA IP and DHCP Hostname as well as Config Portal AP channel, IP, SSID, Password can be configured. Config. Data saved in ESP8266/ESP32 LittleFS, SPIFFS or EEPROM. Multi, Double DetectDetector or Virtual CP Switch feature permits entering CP as requested. Configurable Customs HTML Headers, including Customs Style, Customs Head Elements, CORS Header. Now with scanning of WiFi networks for selection in Configuration Portal. 8 | category=Communication 9 | url=https://github.com/khoih-prog/Blynk_Async_WM 10 | architectures=esp8266,esp32 11 | depends=Blynk,ESP_DoubleResetDetector,ESP_MultiResetDetector,ESP Async WebServer,ESP AsyncTCP,AsyncTCP 12 | -------------------------------------------------------------------------------- /examples/Async_Blynk_WM_Template/MY_BLYNK_COLORS.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | MY_BLYNK_COLORS.h Blynk_WM_Template.ino 3 | For ESP32/ESP8266 boards 4 | Written by Thor Johnson (https://github.com/thorathome) May 2020 as a template for 5 | Blynk Wifi ESP communications. See https://github.com/thorathome/Blynk_Examples 6 | 7 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 8 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 9 | 10 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 11 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 12 | Licensed under MIT license 13 | ********************************************************************************************************************************/ 14 | 15 | #ifndef MY_BLYNK_COLORS_h 16 | #define MY_BLYNK_COLORS_h 17 | 18 | // #include "MY_BLYNK_COLORS.h" 19 | // BLYNK COLOR PALETTE SAMPLE 20 | #define BLYNK_GREEN "#23C48E" 21 | #define BLYNK_BLUE "#04C0F8" 22 | #define BLYNK_YELLOW "#ED9D00" 23 | #define BLYNK_RED "#D3435C" 24 | #define BLYNK_DARK_BLUE "#5F7CD8" 25 | 26 | #define BLYNK_WHITE "#FFFFFF" 27 | 28 | #define BLYNK_TEAL "#00AE97" 29 | #define BLYNK_REALLY_RED "#F90000" 30 | #define BLYNK_PLEASANT_GREEN "#009140" 31 | #define BLYNK_DK_GREY_BACKGRND "#212266" 32 | 33 | #endif //MY_BLYNK_COLORS_h 34 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | ### Describe the bug 11 | 12 | A clear and concise description of what the bug is. 13 | 14 | ### Steps to Reproduce 15 | 16 | Steps to reproduce the behavior. Including the [MRE](https://stackoverflow.com/help/minimal-reproducible-example) sketches 17 | 18 | ### Expected behavior 19 | 20 | A clear and concise description of what you expected to happen. 21 | 22 | ### Actual behavior 23 | 24 | A clear and concise description of what you expected to happen. 25 | 26 | ### Debug and AT-command log (if applicable) 27 | 28 | A clear and concise description of what you expected to happen. 29 | 30 | ### Screenshots 31 | 32 | If applicable, add screenshots to help explain your problem. 33 | 34 | ### Information 35 | 36 | Please ensure to specify the following: 37 | 38 | * Arduino IDE version (e.g. 1.8.13) or Platform.io version 39 | * `ESP8266`,`ESP32` or `STM32` Core Version (e.g. ESP8266 core v2.7.4, ESP32 v1.0.5 or STM32 v1.9.0) 40 | * Contextual information (e.g. what you were trying to achieve) 41 | * Simplest possible steps to reproduce 42 | * Anything that might be relevant in your opinion, such as: 43 | * Operating system (Windows, Ubuntu, etc.) and the output of `uname -a` 44 | * Network configuration 45 | 46 | ### Example 47 | 48 | ``` 49 | Arduino IDE version: 1.8.13 50 | ESP32 Core Version 1.0.5 51 | OS: Ubuntu 20.04 LTS 52 | Linux xy-Inspiron-3593 5.4.0-66-generic #74-Ubuntu SMP Wed Jan 27 22:54:38 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux 53 | 54 | Context: 55 | I encountered an endless loop while trying to connect to Local WiFi. 56 | 57 | Steps to reproduce: 58 | 1. ... 59 | 2. ... 60 | 3. ... 61 | 4. ... 62 | ``` 63 | 64 | ### Additional context 65 | 66 | Add any other context about the problem here. 67 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Contributing to Blynk_Async_WM 2 | 3 | ### Reporting Bugs 4 | 5 | Please report bugs in Blynk_Async_WM if you find them. 6 | 7 | However, before reporting a bug please check through the following: 8 | 9 | * [Existing Open Issues](https://github.com/khoih-prog/Blynk_Async_WM/issues) - someone might have already encountered this. 10 | 11 | If you don't find anything, please [open a new issue](https://github.com/khoih-prog/Blynk_Async_WM/issues/new). 12 | 13 | ### How to submit a bug report 14 | 15 | Please ensure to specify the following: 16 | 17 | * Arduino IDE version (e.g. 1.8.16) or Platform.io version 18 | * `ESP8266` or `ESP32` Core Version (e.g. ESP8266 core v3.0.2 or ESP32 v2.0.0) 19 | * Contextual information (e.g. what you were trying to achieve) 20 | * Simplest possible steps to reproduce 21 | * Anything that might be relevant in your opinion, such as: 22 | * Operating system (Windows, Ubuntu, etc.) and the output of `uname -a` 23 | * Network configuration 24 | 25 | 26 | ### Example 27 | 28 | ``` 29 | Arduino IDE version: v1.8.16 30 | ESP8266 Core Version v3.0.2 31 | OS: Ubuntu 20.04 LTS 32 | Linux Inspiron 5.4.0-86-generic #97-Ubuntu SMP Fri Sep 17 19:19:40 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux 33 | 34 | Context: 35 | The board couldn't autoreconnect to Local Blynk Server after router power recycling. 36 | 37 | Steps to reproduce: 38 | 1. ... 39 | 2. ... 40 | 3. ... 41 | 4. ... 42 | ``` 43 | 44 | ### Sending Feature Requests 45 | 46 | Feel free to post feature requests. It's helpful if you can explain exactly why the feature would be useful. 47 | 48 | There are usually some outstanding feature requests in the [existing issues list](https://github.com/khoih-prog/Blynk_Async_WM/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement), feel free to add comments to them. 49 | 50 | ### Sending Pull Requests 51 | 52 | Pull Requests with changes and fixes are also welcome! 53 | -------------------------------------------------------------------------------- /examples/Async_Blynk_WM_Template/ESP_LED_BUILTINS.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | ESP_LED_BUILTINS.h Blynk_WM_Template.ino 3 | For ESP32/ESP8266 boards 4 | Written by Thor Johnson (https://github.com/thorathome) May 2020 as a template for 5 | Blynk Wifi ESP communications. See https://github.com/thorathome/Blynk_Examples 6 | 7 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 8 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 9 | 10 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 11 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 12 | Licensed under MIT license 13 | ********************************************************************************************************************************/ 14 | 15 | #ifndef ESP_LED_BUILTINS_h 16 | #define ESP_LED_BUILTINS_h 17 | 18 | // This is a simple Kludge that lets sketches be more device-independent 19 | // Arduino for ESP8266 inverts the HIGH/LOW for the onboard LED_BUILTIN 20 | // Use LED_BUILTIN_HIGH and LED_BUILTIN_LOW in your sketch and all will be right with the world 21 | 22 | #if ESP8266 // There's a quirk in Arduino that has the LED_BUILTIN inverted. This corrects for it. 23 | #define LED_BUILTIN_HIGH LOW 24 | #define LED_BUILTIN_LOW HIGH 25 | #else 26 | #define LED_BUILTIN_HIGH HIGH 27 | #define LED_BUILTIN_LOW LOW 28 | #endif 29 | 30 | // Also the ESP32 board manager files appear to NOT have LED_BUILTIN assigned correctly 31 | // This fixes that 32 | #if ESP32 33 | #ifdef LED_BUILTIN 34 | #undef LED_BUILTIN 35 | #endif 36 | #define LED_BUILTIN 13 // NOT DEFINED IN ESP32 BOARD FILES - HMMM. 37 | #endif 38 | 39 | #endif //ESP_LED_BUILTINS_h 40 | -------------------------------------------------------------------------------- /examples/ESP32_MultiTask/Async_ESP32_MultiTask/bmp.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | bmp.h 3 | For ESP32 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | // ArduinoMenu 14 | // Height : 8 pixels 15 | // Width : 8 pixels 16 | 17 | // Just fake bmp to satisfy compiler. You have to replace this with the real and working one. 18 | 19 | const unsigned short wifi[64] PROGMEM = 20 | { 21 | 0x8410, 0x630c, 0x630c, 0x630c, 0x630c, 0x630c, 0x630c, 0x630c, 22 | 0x630c, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 23 | 0x630c, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 24 | 0x630c, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 25 | 0x8410, 0x630c, 0x630c, 0x630c, 0x630c, 0x630c, 0x630c, 0x630c, 26 | 0x630c, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 27 | 0x630c, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 28 | 0x630c, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 29 | }; 30 | 31 | const unsigned short rec[64] PROGMEM = 32 | { 33 | 0x8410, 0x630c, 0x630c, 0x630c, 0x630c, 0x630c, 0x630c, 0x630c, 34 | 0x630c, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 35 | 0x630c, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 36 | 0x630c, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 37 | 0x8410, 0x630c, 0x630c, 0x630c, 0x630c, 0x630c, 0x630c, 0x630c, 38 | 0x630c, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 39 | 0x630c, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 40 | 0x630c, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 41 | }; 42 | -------------------------------------------------------------------------------- /examples/Async_DHT11ESP32/Credentials.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | Credentials.h 3 | For ESP32 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef Credentials_h 14 | #define Credentials_h 15 | 16 | /// Start Default Config Data ////////////////// 17 | 18 | /* 19 | // Defined in and 20 | 21 | #define SSID_MAX_LEN 32 22 | #define PASS_MAX_LEN 64 23 | 24 | typedef struct 25 | { 26 | char wifi_ssid[SSID_MAX_LEN]; 27 | char wifi_pw [PASS_MAX_LEN]; 28 | } WiFi_Credentials; 29 | 30 | #define BLYNK_SERVER_MAX_LEN 32 31 | #define BLYNK_TOKEN_MAX_LEN 36 32 | 33 | typedef struct 34 | { 35 | char blynk_server[BLYNK_SERVER_MAX_LEN]; 36 | char blynk_token [BLYNK_TOKEN_MAX_LEN]; 37 | } Blynk_Credentials; 38 | 39 | #define NUM_WIFI_CREDENTIALS 2 40 | #define NUM_BLYNK_CREDENTIALS 2 41 | 42 | typedef struct Configuration 43 | { 44 | char header [16]; 45 | WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS]; 46 | Blynk_Credentials Blynk_Creds [NUM_BLYNK_CREDENTIALS]; 47 | int blynk_port; 48 | char board_name [24]; 49 | int checkSum; 50 | } Blynk_WM_Configuration; 51 | 52 | */ 53 | 54 | //bool LOAD_DEFAULT_CONFIG_DATA = true; 55 | bool LOAD_DEFAULT_CONFIG_DATA = false; 56 | 57 | Blynk_WM_Configuration defaultConfig = 58 | { 59 | //char header[16], dummy, not used 60 | #if USE_SSL 61 | "SSL", 62 | #else 63 | "NonSSL", 64 | #endif 65 | //WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS] 66 | //WiFi_Creds.wifi_ssid and WiFi_Creds.wifi_pw 67 | "SSID1", "password1", 68 | "SSID2", "password2", 69 | // Blynk_Credentials Blynk_Creds [NUM_BLYNK_CREDENTIALS]; 70 | // Blynk_Creds.blynk_server and Blynk_Creds.blynk_token 71 | "account.ddns.net", "token", 72 | "account.duckdns.org", "token1", 73 | //int blynk_port; 74 | #if USE_SSL 75 | 9443, 76 | #else 77 | 8080, 78 | #endif 79 | //char board_name [24]; 80 | "ESP32-Async-Blynk", 81 | //int checkSum, dummy, not used 82 | 0 83 | }; 84 | 85 | /////////// End Default Config Data ///////////// 86 | 87 | 88 | #endif //Credentials_h 89 | -------------------------------------------------------------------------------- /examples/Async_AM2315_ESP8266/Credentials.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | Credentials.h 3 | For ESP8266 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef Credentials_h 14 | #define Credentials_h 15 | 16 | /// Start Default Config Data ////////////////// 17 | 18 | /* 19 | //Defined in and 20 | 21 | #define SSID_MAX_LEN 32 22 | #define PASS_MAX_LEN 64 23 | 24 | typedef struct 25 | { 26 | char wifi_ssid[SSID_MAX_LEN]; 27 | char wifi_pw [PASS_MAX_LEN]; 28 | } WiFi_Credentials; 29 | 30 | #define BLYNK_SERVER_MAX_LEN 32 31 | #define BLYNK_TOKEN_MAX_LEN 36 32 | 33 | typedef struct 34 | { 35 | char blynk_server[BLYNK_SERVER_MAX_LEN]; 36 | char blynk_token [BLYNK_TOKEN_MAX_LEN]; 37 | } Blynk_Credentials; 38 | 39 | #define NUM_WIFI_CREDENTIALS 2 40 | #define NUM_BLYNK_CREDENTIALS 2 41 | 42 | typedef struct Configuration 43 | { 44 | char header [16]; 45 | WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS]; 46 | Blynk_Credentials Blynk_Creds [NUM_BLYNK_CREDENTIALS]; 47 | int blynk_port; 48 | char board_name [24]; 49 | int checkSum; 50 | } Blynk_WM_Configuration; 51 | 52 | */ 53 | 54 | bool LOAD_DEFAULT_CONFIG_DATA = true; 55 | //bool LOAD_DEFAULT_CONFIG_DATA = false; 56 | 57 | Blynk_WM_Configuration defaultConfig = 58 | { 59 | //char header[16], dummy, not used 60 | #if USE_SSL 61 | "SSL", 62 | #else 63 | "NonSSL", 64 | #endif 65 | //WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS] 66 | //WiFi_Creds.wifi_ssid and WiFi_Creds.wifi_pw 67 | "SSID1", "password1", 68 | "SSID2", "password2", 69 | // Blynk_Credentials Blynk_Creds [NUM_BLYNK_CREDENTIALS]; 70 | // Blynk_Creds.blynk_server and Blynk_Creds.blynk_token 71 | "account.ddns.net", "token", 72 | "account.duckdns.org", "token1", 73 | //int blynk_port; 74 | #if USE_SSL 75 | 9443, 76 | #else 77 | 8080, 78 | #endif 79 | //char board_name [24]; 80 | "Async-ESP8266-Blynk", 81 | //int checkSum, dummy, not used 82 | 0 83 | }; 84 | 85 | /////////// End Default Config Data ///////////// 86 | 87 | 88 | #endif //Credentials_h 89 | -------------------------------------------------------------------------------- /examples/Async_DHT11ESP32_SSL/Credentials.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | Credentials.h 3 | For ESP32 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef Credentials_h 14 | #define Credentials_h 15 | 16 | /// Start Default Config Data ////////////////// 17 | 18 | /* 19 | // Defined in and 20 | 21 | #define SSID_MAX_LEN 32 22 | #define PASS_MAX_LEN 64 23 | 24 | typedef struct 25 | { 26 | char wifi_ssid[SSID_MAX_LEN]; 27 | char wifi_pw [PASS_MAX_LEN]; 28 | } WiFi_Credentials; 29 | 30 | #define BLYNK_SERVER_MAX_LEN 32 31 | #define BLYNK_TOKEN_MAX_LEN 36 32 | 33 | typedef struct 34 | { 35 | char blynk_server[BLYNK_SERVER_MAX_LEN]; 36 | char blynk_token [BLYNK_TOKEN_MAX_LEN]; 37 | } Blynk_Credentials; 38 | 39 | #define NUM_WIFI_CREDENTIALS 2 40 | #define NUM_BLYNK_CREDENTIALS 2 41 | 42 | typedef struct Configuration 43 | { 44 | char header [16]; 45 | WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS]; 46 | Blynk_Credentials Blynk_Creds [NUM_BLYNK_CREDENTIALS]; 47 | int blynk_port; 48 | char board_name [24]; 49 | int checkSum; 50 | } Blynk_WM_Configuration; 51 | 52 | */ 53 | 54 | //bool LOAD_DEFAULT_CONFIG_DATA = true; 55 | bool LOAD_DEFAULT_CONFIG_DATA = false; 56 | 57 | Blynk_WM_Configuration defaultConfig = 58 | { 59 | //char header[16], dummy, not used 60 | #if USE_SSL 61 | "SSL", 62 | #else 63 | "NonSSL", 64 | #endif 65 | //WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS] 66 | //WiFi_Creds.wifi_ssid and WiFi_Creds.wifi_pw 67 | "SSID1", "password1", 68 | "SSID2", "password2", 69 | // Blynk_Credentials Blynk_Creds [NUM_BLYNK_CREDENTIALS]; 70 | // Blynk_Creds.blynk_server and Blynk_Creds.blynk_token 71 | "account.ddns.net", "token", 72 | "account.duckdns.org", "token1", 73 | //int blynk_port; 74 | #if USE_SSL 75 | 9443, 76 | #else 77 | 8080, 78 | #endif 79 | //char board_name [24]; 80 | "ESP32-Async-Blynk", 81 | //int checkSum, dummy, not used 82 | 0 83 | }; 84 | 85 | /////////// End Default Config Data ///////////// 86 | 87 | 88 | #endif //Credentials_h 89 | -------------------------------------------------------------------------------- /examples/Async_DHT11ESP8266/Credentials.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | Credentials.h 3 | For ESP8266 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef Credentials_h 14 | #define Credentials_h 15 | 16 | /// Start Default Config Data ////////////////// 17 | 18 | /* 19 | //Defined in and 20 | 21 | #define SSID_MAX_LEN 32 22 | #define PASS_MAX_LEN 64 23 | 24 | typedef struct 25 | { 26 | char wifi_ssid[SSID_MAX_LEN]; 27 | char wifi_pw [PASS_MAX_LEN]; 28 | } WiFi_Credentials; 29 | 30 | #define BLYNK_SERVER_MAX_LEN 32 31 | #define BLYNK_TOKEN_MAX_LEN 36 32 | 33 | typedef struct 34 | { 35 | char blynk_server[BLYNK_SERVER_MAX_LEN]; 36 | char blynk_token [BLYNK_TOKEN_MAX_LEN]; 37 | } Blynk_Credentials; 38 | 39 | #define NUM_WIFI_CREDENTIALS 2 40 | #define NUM_BLYNK_CREDENTIALS 2 41 | 42 | typedef struct Configuration 43 | { 44 | char header [16]; 45 | WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS]; 46 | Blynk_Credentials Blynk_Creds [NUM_BLYNK_CREDENTIALS]; 47 | int blynk_port; 48 | char board_name [24]; 49 | int checkSum; 50 | } Blynk_WM_Configuration; 51 | 52 | */ 53 | 54 | bool LOAD_DEFAULT_CONFIG_DATA = true; 55 | //bool LOAD_DEFAULT_CONFIG_DATA = false; 56 | 57 | Blynk_WM_Configuration defaultConfig = 58 | { 59 | //char header[16], dummy, not used 60 | #if USE_SSL 61 | "SSL", 62 | #else 63 | "NonSSL", 64 | #endif 65 | //WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS] 66 | //WiFi_Creds.wifi_ssid and WiFi_Creds.wifi_pw 67 | "SSID1", "password1", 68 | "SSID2", "password2", 69 | // Blynk_Credentials Blynk_Creds [NUM_BLYNK_CREDENTIALS]; 70 | // Blynk_Creds.blynk_server and Blynk_Creds.blynk_token 71 | "account.ddns.net", "token", 72 | "account.duckdns.org", "token1", 73 | //int blynk_port; 74 | #if USE_SSL 75 | 9443, 76 | #else 77 | 8080, 78 | #endif 79 | //char board_name [24]; 80 | "Async-ESP8266-Blynk", 81 | //int checkSum, dummy, not used 82 | 0 83 | }; 84 | 85 | /////////// End Default Config Data ///////////// 86 | 87 | 88 | #endif //Credentials_h 89 | -------------------------------------------------------------------------------- /examples/Async_DHT11ESP8266_SSL/Credentials.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | Credentials.h 3 | For ESP8266 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef Credentials_h 14 | #define Credentials_h 15 | 16 | /// Start Default Config Data ////////////////// 17 | 18 | /* 19 | //Defined in and 20 | 21 | #define SSID_MAX_LEN 32 22 | #define PASS_MAX_LEN 64 23 | 24 | typedef struct 25 | { 26 | char wifi_ssid[SSID_MAX_LEN]; 27 | char wifi_pw [PASS_MAX_LEN]; 28 | } WiFi_Credentials; 29 | 30 | #define BLYNK_SERVER_MAX_LEN 32 31 | #define BLYNK_TOKEN_MAX_LEN 36 32 | 33 | typedef struct 34 | { 35 | char blynk_server[BLYNK_SERVER_MAX_LEN]; 36 | char blynk_token [BLYNK_TOKEN_MAX_LEN]; 37 | } Blynk_Credentials; 38 | 39 | #define NUM_WIFI_CREDENTIALS 2 40 | #define NUM_BLYNK_CREDENTIALS 2 41 | 42 | typedef struct Configuration 43 | { 44 | char header [16]; 45 | WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS]; 46 | Blynk_Credentials Blynk_Creds [NUM_BLYNK_CREDENTIALS]; 47 | int blynk_port; 48 | char board_name [24]; 49 | int checkSum; 50 | } Blynk_WM_Configuration; 51 | 52 | */ 53 | 54 | bool LOAD_DEFAULT_CONFIG_DATA = true; 55 | //bool LOAD_DEFAULT_CONFIG_DATA = false; 56 | 57 | Blynk_WM_Configuration defaultConfig = 58 | { 59 | //char header[16], dummy, not used 60 | #if USE_SSL 61 | "SSL", 62 | #else 63 | "NonSSL", 64 | #endif 65 | //WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS] 66 | //WiFi_Creds.wifi_ssid and WiFi_Creds.wifi_pw 67 | "SSID1", "password1", 68 | "SSID2", "password2", 69 | // Blynk_Credentials Blynk_Creds [NUM_BLYNK_CREDENTIALS]; 70 | // Blynk_Creds.blynk_server and Blynk_Creds.blynk_token 71 | "account.ddns.net", "token", 72 | "account.duckdns.org", "token1", 73 | //int blynk_port; 74 | #if USE_SSL 75 | 9443, 76 | #else 77 | 8080, 78 | #endif 79 | //char board_name [24]; 80 | "Async-ESP8266-Blynk", 81 | //int checkSum, dummy, not used 82 | 0 83 | }; 84 | 85 | /////////// End Default Config Data ///////////// 86 | 87 | 88 | #endif //Credentials_h 89 | -------------------------------------------------------------------------------- /examples/Async_ESP32WM_Config/Credentials.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | Credentials.h 3 | For ESP32 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef Credentials_h 14 | #define Credentials_h 15 | 16 | /// Start Default Config Data ////////////////// 17 | 18 | /* 19 | // Defined in and 20 | 21 | #define SSID_MAX_LEN 32 22 | #define PASS_MAX_LEN 64 23 | 24 | typedef struct 25 | { 26 | char wifi_ssid[SSID_MAX_LEN]; 27 | char wifi_pw [PASS_MAX_LEN]; 28 | } WiFi_Credentials; 29 | 30 | #define BLYNK_SERVER_MAX_LEN 32 31 | #define BLYNK_TOKEN_MAX_LEN 36 32 | 33 | typedef struct 34 | { 35 | char blynk_server[BLYNK_SERVER_MAX_LEN]; 36 | char blynk_token [BLYNK_TOKEN_MAX_LEN]; 37 | } Blynk_Credentials; 38 | 39 | #define NUM_WIFI_CREDENTIALS 2 40 | #define NUM_BLYNK_CREDENTIALS 2 41 | 42 | typedef struct Configuration 43 | { 44 | char header [16]; 45 | WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS]; 46 | Blynk_Credentials Blynk_Creds [NUM_BLYNK_CREDENTIALS]; 47 | int blynk_port; 48 | char board_name [24]; 49 | int checkSum; 50 | } Blynk_WM_Configuration; 51 | 52 | */ 53 | 54 | //bool LOAD_DEFAULT_CONFIG_DATA = true; 55 | bool LOAD_DEFAULT_CONFIG_DATA = false; 56 | 57 | Blynk_WM_Configuration defaultConfig = 58 | { 59 | //char header[16], dummy, not used 60 | #if USE_SSL 61 | "SSL", 62 | #else 63 | "NonSSL", 64 | #endif 65 | //WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS] 66 | //WiFi_Creds.wifi_ssid and WiFi_Creds.wifi_pw 67 | "SSID1", "password1", 68 | "SSID2", "password2", 69 | // Blynk_Credentials Blynk_Creds [NUM_BLYNK_CREDENTIALS]; 70 | // Blynk_Creds.blynk_server and Blynk_Creds.blynk_token 71 | "account.ddns.net", "token", 72 | "account.duckdns.org", "token1", 73 | //int blynk_port; 74 | #if USE_SSL 75 | 9443, 76 | #else 77 | 8080, 78 | #endif 79 | //char board_name [24]; 80 | "ESP32-Async-Blynk", 81 | //int checkSum, dummy, not used 82 | 0 83 | }; 84 | 85 | /////////// End Default Config Data ///////////// 86 | 87 | 88 | #endif //Credentials_h 89 | -------------------------------------------------------------------------------- /examples/Async_AM2315_ESP32_SSL/Credentials.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************************************************************* 2 | Credentials.h 3 | For ESP32 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef Credentials_h 14 | #define Credentials_h 15 | 16 | /// Start Default Config Data ////////////////// 17 | 18 | /* 19 | // Defined in and 20 | 21 | #define SSID_MAX_LEN 32 22 | #define PASS_MAX_LEN 64 23 | 24 | typedef struct 25 | { 26 | char wifi_ssid[SSID_MAX_LEN]; 27 | char wifi_pw [PASS_MAX_LEN]; 28 | } WiFi_Credentials; 29 | 30 | #define BLYNK_SERVER_MAX_LEN 32 31 | #define BLYNK_TOKEN_MAX_LEN 36 32 | 33 | typedef struct 34 | { 35 | char blynk_server[BLYNK_SERVER_MAX_LEN]; 36 | char blynk_token [BLYNK_TOKEN_MAX_LEN]; 37 | } Blynk_Credentials; 38 | 39 | #define NUM_WIFI_CREDENTIALS 2 40 | #define NUM_BLYNK_CREDENTIALS 2 41 | 42 | typedef struct Configuration 43 | { 44 | char header [16]; 45 | WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS]; 46 | Blynk_Credentials Blynk_Creds [NUM_BLYNK_CREDENTIALS]; 47 | int blynk_port; 48 | char board_name [24]; 49 | int checkSum; 50 | } Blynk_WM_Configuration; 51 | 52 | */ 53 | 54 | //bool LOAD_DEFAULT_CONFIG_DATA = true; 55 | bool LOAD_DEFAULT_CONFIG_DATA = false; 56 | 57 | Blynk_WM_Configuration defaultConfig = 58 | { 59 | //char header[16], dummy, not used 60 | #if USE_SSL 61 | "SSL", 62 | #else 63 | "NonSSL", 64 | #endif 65 | //WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS] 66 | //WiFi_Creds.wifi_ssid and WiFi_Creds.wifi_pw 67 | "SSID1", "password1", 68 | "SSID2", "password2", 69 | // Blynk_Credentials Blynk_Creds [NUM_BLYNK_CREDENTIALS]; 70 | // Blynk_Creds.blynk_server and Blynk_Creds.blynk_token 71 | "account.ddns.net", "token", 72 | "account.duckdns.org", "token1", 73 | //int blynk_port; 74 | #if USE_SSL 75 | 9443, 76 | #else 77 | 8080, 78 | #endif 79 | //char board_name [24]; 80 | "ESP32-Async-Blynk", 81 | //int checkSum, dummy, not used 82 | 0 83 | }; 84 | 85 | /////////// End Default Config Data ///////////// 86 | 87 | 88 | #endif //Credentials_h 89 | -------------------------------------------------------------------------------- /examples/Async_DHT11ESP8266_Debug/Credentials.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | Credentials.h 3 | For ESP8266 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef Credentials_h 14 | #define Credentials_h 15 | 16 | /// Start Default Config Data ////////////////// 17 | 18 | /* 19 | //Defined in and 20 | 21 | #define SSID_MAX_LEN 32 22 | #define PASS_MAX_LEN 64 23 | 24 | typedef struct 25 | { 26 | char wifi_ssid[SSID_MAX_LEN]; 27 | char wifi_pw [PASS_MAX_LEN]; 28 | } WiFi_Credentials; 29 | 30 | #define BLYNK_SERVER_MAX_LEN 32 31 | #define BLYNK_TOKEN_MAX_LEN 36 32 | 33 | typedef struct 34 | { 35 | char blynk_server[BLYNK_SERVER_MAX_LEN]; 36 | char blynk_token [BLYNK_TOKEN_MAX_LEN]; 37 | } Blynk_Credentials; 38 | 39 | #define NUM_WIFI_CREDENTIALS 2 40 | #define NUM_BLYNK_CREDENTIALS 2 41 | 42 | typedef struct Configuration 43 | { 44 | char header [16]; 45 | WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS]; 46 | Blynk_Credentials Blynk_Creds [NUM_BLYNK_CREDENTIALS]; 47 | int blynk_port; 48 | char board_name [24]; 49 | int checkSum; 50 | } Blynk_WM_Configuration; 51 | 52 | */ 53 | 54 | bool LOAD_DEFAULT_CONFIG_DATA = true; 55 | //bool LOAD_DEFAULT_CONFIG_DATA = false; 56 | 57 | Blynk_WM_Configuration defaultConfig = 58 | { 59 | //char header[16], dummy, not used 60 | #if USE_SSL 61 | "SSL", 62 | #else 63 | "NonSSL", 64 | #endif 65 | //WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS] 66 | //WiFi_Creds.wifi_ssid and WiFi_Creds.wifi_pw 67 | "SSID1", "password1", 68 | "SSID2", "password2", 69 | // Blynk_Credentials Blynk_Creds [NUM_BLYNK_CREDENTIALS]; 70 | // Blynk_Creds.blynk_server and Blynk_Creds.blynk_token 71 | "account.ddns.net", "token", 72 | "account.duckdns.org", "token1", 73 | //int blynk_port; 74 | #if USE_SSL 75 | 9443, 76 | #else 77 | 8080, 78 | #endif 79 | //char board_name [24]; 80 | "Async-ESP8266-Blynk", 81 | //int checkSum, dummy, not used 82 | 0 83 | }; 84 | 85 | /////////// End Default Config Data ///////////// 86 | 87 | 88 | #endif //Credentials_h 89 | -------------------------------------------------------------------------------- /examples/Async_ESP32WM_ForcedConfig/Credentials.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | Credentials.h 3 | For ESP32 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef Credentials_h 14 | #define Credentials_h 15 | 16 | /// Start Default Config Data ////////////////// 17 | 18 | /* 19 | // Defined in and 20 | 21 | #define SSID_MAX_LEN 32 22 | #define PASS_MAX_LEN 64 23 | 24 | typedef struct 25 | { 26 | char wifi_ssid[SSID_MAX_LEN]; 27 | char wifi_pw [PASS_MAX_LEN]; 28 | } WiFi_Credentials; 29 | 30 | #define BLYNK_SERVER_MAX_LEN 32 31 | #define BLYNK_TOKEN_MAX_LEN 36 32 | 33 | typedef struct 34 | { 35 | char blynk_server[BLYNK_SERVER_MAX_LEN]; 36 | char blynk_token [BLYNK_TOKEN_MAX_LEN]; 37 | } Blynk_Credentials; 38 | 39 | #define NUM_WIFI_CREDENTIALS 2 40 | #define NUM_BLYNK_CREDENTIALS 2 41 | 42 | typedef struct Configuration 43 | { 44 | char header [16]; 45 | WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS]; 46 | Blynk_Credentials Blynk_Creds [NUM_BLYNK_CREDENTIALS]; 47 | int blynk_port; 48 | char board_name [24]; 49 | int checkSum; 50 | } Blynk_WM_Configuration; 51 | 52 | */ 53 | 54 | //bool LOAD_DEFAULT_CONFIG_DATA = true; 55 | bool LOAD_DEFAULT_CONFIG_DATA = false; 56 | 57 | Blynk_WM_Configuration defaultConfig = 58 | { 59 | //char header[16], dummy, not used 60 | #if USE_SSL 61 | "SSL", 62 | #else 63 | "NonSSL", 64 | #endif 65 | //WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS] 66 | //WiFi_Creds.wifi_ssid and WiFi_Creds.wifi_pw 67 | "SSID1", "password1", 68 | "SSID2", "password2", 69 | // Blynk_Credentials Blynk_Creds [NUM_BLYNK_CREDENTIALS]; 70 | // Blynk_Creds.blynk_server and Blynk_Creds.blynk_token 71 | "account.ddns.net", "token", 72 | "account.duckdns.org", "token1", 73 | //int blynk_port; 74 | #if USE_SSL 75 | 9443, 76 | #else 77 | 8080, 78 | #endif 79 | //char board_name [24]; 80 | "ESP32-Async-Blynk", 81 | //int checkSum, dummy, not used 82 | 0 83 | }; 84 | 85 | /////////// End Default Config Data ///////////// 86 | 87 | 88 | #endif //Credentials_h 89 | -------------------------------------------------------------------------------- /examples/Async_ESP32WM_MRD_Config/Credentials.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | Credentials.h 3 | For ESP32 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef Credentials_h 14 | #define Credentials_h 15 | 16 | /// Start Default Config Data ////////////////// 17 | 18 | /* 19 | // Defined in and 20 | 21 | #define SSID_MAX_LEN 32 22 | #define PASS_MAX_LEN 64 23 | 24 | typedef struct 25 | { 26 | char wifi_ssid[SSID_MAX_LEN]; 27 | char wifi_pw [PASS_MAX_LEN]; 28 | } WiFi_Credentials; 29 | 30 | #define BLYNK_SERVER_MAX_LEN 32 31 | #define BLYNK_TOKEN_MAX_LEN 36 32 | 33 | typedef struct 34 | { 35 | char blynk_server[BLYNK_SERVER_MAX_LEN]; 36 | char blynk_token [BLYNK_TOKEN_MAX_LEN]; 37 | } Blynk_Credentials; 38 | 39 | #define NUM_WIFI_CREDENTIALS 2 40 | #define NUM_BLYNK_CREDENTIALS 2 41 | 42 | typedef struct Configuration 43 | { 44 | char header [16]; 45 | WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS]; 46 | Blynk_Credentials Blynk_Creds [NUM_BLYNK_CREDENTIALS]; 47 | int blynk_port; 48 | char board_name [24]; 49 | int checkSum; 50 | } Blynk_WM_Configuration; 51 | 52 | */ 53 | 54 | //bool LOAD_DEFAULT_CONFIG_DATA = true; 55 | bool LOAD_DEFAULT_CONFIG_DATA = false; 56 | 57 | Blynk_WM_Configuration defaultConfig = 58 | { 59 | //char header[16], dummy, not used 60 | #if USE_SSL 61 | "SSL", 62 | #else 63 | "NonSSL", 64 | #endif 65 | //WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS] 66 | //WiFi_Creds.wifi_ssid and WiFi_Creds.wifi_pw 67 | "SSID1", "password1", 68 | "SSID2", "password2", 69 | // Blynk_Credentials Blynk_Creds [NUM_BLYNK_CREDENTIALS]; 70 | // Blynk_Creds.blynk_server and Blynk_Creds.blynk_token 71 | "account.ddns.net", "token", 72 | "account.duckdns.org", "token1", 73 | //int blynk_port; 74 | #if USE_SSL 75 | 9443, 76 | #else 77 | 8080, 78 | #endif 79 | //char board_name [24]; 80 | "ESP32-Async-Blynk", 81 | //int checkSum, dummy, not used 82 | 0 83 | }; 84 | 85 | /////////// End Default Config Data ///////////// 86 | 87 | 88 | #endif //Credentials_h 89 | -------------------------------------------------------------------------------- /examples/Async_ESP32WM_MRD_ForcedConfig/Credentials.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | Credentials.h 3 | For ESP32 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef Credentials_h 14 | #define Credentials_h 15 | 16 | /// Start Default Config Data ////////////////// 17 | 18 | /* 19 | // Defined in and 20 | 21 | #define SSID_MAX_LEN 32 22 | #define PASS_MAX_LEN 64 23 | 24 | typedef struct 25 | { 26 | char wifi_ssid[SSID_MAX_LEN]; 27 | char wifi_pw [PASS_MAX_LEN]; 28 | } WiFi_Credentials; 29 | 30 | #define BLYNK_SERVER_MAX_LEN 32 31 | #define BLYNK_TOKEN_MAX_LEN 36 32 | 33 | typedef struct 34 | { 35 | char blynk_server[BLYNK_SERVER_MAX_LEN]; 36 | char blynk_token [BLYNK_TOKEN_MAX_LEN]; 37 | } Blynk_Credentials; 38 | 39 | #define NUM_WIFI_CREDENTIALS 2 40 | #define NUM_BLYNK_CREDENTIALS 2 41 | 42 | typedef struct Configuration 43 | { 44 | char header [16]; 45 | WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS]; 46 | Blynk_Credentials Blynk_Creds [NUM_BLYNK_CREDENTIALS]; 47 | int blynk_port; 48 | char board_name [24]; 49 | int checkSum; 50 | } Blynk_WM_Configuration; 51 | 52 | */ 53 | 54 | //bool LOAD_DEFAULT_CONFIG_DATA = true; 55 | bool LOAD_DEFAULT_CONFIG_DATA = false; 56 | 57 | Blynk_WM_Configuration defaultConfig = 58 | { 59 | //char header[16], dummy, not used 60 | #if USE_SSL 61 | "SSL", 62 | #else 63 | "NonSSL", 64 | #endif 65 | //WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS] 66 | //WiFi_Creds.wifi_ssid and WiFi_Creds.wifi_pw 67 | "SSID1", "password1", 68 | "SSID2", "password2", 69 | // Blynk_Credentials Blynk_Creds [NUM_BLYNK_CREDENTIALS]; 70 | // Blynk_Creds.blynk_server and Blynk_Creds.blynk_token 71 | "account.ddns.net", "token", 72 | "account.duckdns.org", "token1", 73 | //int blynk_port; 74 | #if USE_SSL 75 | 9443, 76 | #else 77 | 8080, 78 | #endif 79 | //char board_name [24]; 80 | "ESP32-Async-Blynk", 81 | //int checkSum, dummy, not used 82 | 0 83 | }; 84 | 85 | /////////// End Default Config Data ///////////// 86 | 87 | 88 | #endif //Credentials_h 89 | -------------------------------------------------------------------------------- /examples/Async_ESP8266WM_Config/Credentials.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | Credentials.h 3 | For ESP8266 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef Credentials_h 14 | #define Credentials_h 15 | 16 | /// Start Default Config Data ////////////////// 17 | 18 | /* 19 | // Defined in and 20 | 21 | #define SSID_MAX_LEN 32 22 | #define PASS_MAX_LEN 64 23 | 24 | typedef struct 25 | { 26 | char wifi_ssid[SSID_MAX_LEN]; 27 | char wifi_pw [PASS_MAX_LEN]; 28 | } WiFi_Credentials; 29 | 30 | #define BLYNK_SERVER_MAX_LEN 32 31 | #define BLYNK_TOKEN_MAX_LEN 36 32 | 33 | typedef struct 34 | { 35 | char blynk_server[BLYNK_SERVER_MAX_LEN]; 36 | char blynk_token [BLYNK_TOKEN_MAX_LEN]; 37 | } Blynk_Credentials; 38 | 39 | #define NUM_WIFI_CREDENTIALS 2 40 | #define NUM_BLYNK_CREDENTIALS 2 41 | 42 | typedef struct Configuration 43 | { 44 | char header [16]; 45 | WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS]; 46 | Blynk_Credentials Blynk_Creds [NUM_BLYNK_CREDENTIALS]; 47 | int blynk_port; 48 | char board_name [24]; 49 | int checkSum; 50 | } Blynk_WM_Configuration; 51 | 52 | */ 53 | 54 | //bool LOAD_DEFAULT_CONFIG_DATA = true; 55 | bool LOAD_DEFAULT_CONFIG_DATA = false; 56 | 57 | Blynk_WM_Configuration defaultConfig = 58 | { 59 | //char header[16], dummy, not used 60 | #if USE_SSL 61 | "SSL", 62 | #else 63 | "NonSSL", 64 | #endif 65 | //WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS] 66 | //WiFi_Creds.wifi_ssid and WiFi_Creds.wifi_pw 67 | "SSID1", "password1", 68 | "SSID2", "password2", 69 | // Blynk_Credentials Blynk_Creds [NUM_BLYNK_CREDENTIALS]; 70 | // Blynk_Creds.blynk_server and Blynk_Creds.blynk_token 71 | "account.ddns.net", "token", 72 | "account.duckdns.org", "token1", 73 | //int blynk_port; 74 | #if USE_SSL 75 | 9443, 76 | #else 77 | 8080, 78 | #endif 79 | //char board_name [24]; 80 | "ESP8266-Async-Blynk", 81 | //int checkSum, dummy, not used 82 | 0 83 | }; 84 | 85 | /////////// End Default Config Data ///////////// 86 | 87 | 88 | #endif //Credentials_h 89 | -------------------------------------------------------------------------------- /examples/ESP32_MultiTask/AsyncMT_DHT11ESP32/Credentials.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | Credentials.h 3 | For ESP32 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef Credentials_h 14 | #define Credentials_h 15 | 16 | /// Start Default Config Data ////////////////// 17 | 18 | /* 19 | // Defined in and 20 | 21 | #define SSID_MAX_LEN 32 22 | #define PASS_MAX_LEN 64 23 | 24 | typedef struct 25 | { 26 | char wifi_ssid[SSID_MAX_LEN]; 27 | char wifi_pw [PASS_MAX_LEN]; 28 | } WiFi_Credentials; 29 | 30 | #define BLYNK_SERVER_MAX_LEN 32 31 | #define BLYNK_TOKEN_MAX_LEN 36 32 | 33 | typedef struct 34 | { 35 | char blynk_server[BLYNK_SERVER_MAX_LEN]; 36 | char blynk_token [BLYNK_TOKEN_MAX_LEN]; 37 | } Blynk_Credentials; 38 | 39 | #define NUM_WIFI_CREDENTIALS 2 40 | #define NUM_BLYNK_CREDENTIALS 2 41 | 42 | typedef struct Configuration 43 | { 44 | char header [16]; 45 | WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS]; 46 | Blynk_Credentials Blynk_Creds [NUM_BLYNK_CREDENTIALS]; 47 | int blynk_port; 48 | char board_name [24]; 49 | int checkSum; 50 | } Blynk_WM_Configuration; 51 | 52 | */ 53 | 54 | //bool LOAD_DEFAULT_CONFIG_DATA = true; 55 | bool LOAD_DEFAULT_CONFIG_DATA = false; 56 | 57 | Blynk_WM_Configuration defaultConfig = 58 | { 59 | //char header[16], dummy, not used 60 | #if USE_SSL 61 | "SSL", 62 | #else 63 | "NonSSL", 64 | #endif 65 | //WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS] 66 | //WiFi_Creds.wifi_ssid and WiFi_Creds.wifi_pw 67 | "SSID1", "password1", 68 | "SSID2", "password2", 69 | // Blynk_Credentials Blynk_Creds [NUM_BLYNK_CREDENTIALS]; 70 | // Blynk_Creds.blynk_server and Blynk_Creds.blynk_token 71 | "account.ddns.net", "token", 72 | "account.duckdns.org", "token1", 73 | //int blynk_port; 74 | #if USE_SSL 75 | 9443, 76 | #else 77 | 8080, 78 | #endif 79 | //char board_name [24]; 80 | "ESP32-Async-Blynk", 81 | //int checkSum, dummy, not used 82 | 0 83 | }; 84 | 85 | /////////// End Default Config Data ///////////// 86 | 87 | 88 | #endif //Credentials_h 89 | -------------------------------------------------------------------------------- /examples/Async_ESP8266WM_ForcedConfig/Credentials.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | Credentials.h 3 | For ESP8266 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef Credentials_h 14 | #define Credentials_h 15 | 16 | /// Start Default Config Data ////////////////// 17 | 18 | /* 19 | // Defined in and 20 | 21 | #define SSID_MAX_LEN 32 22 | #define PASS_MAX_LEN 64 23 | 24 | typedef struct 25 | { 26 | char wifi_ssid[SSID_MAX_LEN]; 27 | char wifi_pw [PASS_MAX_LEN]; 28 | } WiFi_Credentials; 29 | 30 | #define BLYNK_SERVER_MAX_LEN 32 31 | #define BLYNK_TOKEN_MAX_LEN 36 32 | 33 | typedef struct 34 | { 35 | char blynk_server[BLYNK_SERVER_MAX_LEN]; 36 | char blynk_token [BLYNK_TOKEN_MAX_LEN]; 37 | } Blynk_Credentials; 38 | 39 | #define NUM_WIFI_CREDENTIALS 2 40 | #define NUM_BLYNK_CREDENTIALS 2 41 | 42 | typedef struct Configuration 43 | { 44 | char header [16]; 45 | WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS]; 46 | Blynk_Credentials Blynk_Creds [NUM_BLYNK_CREDENTIALS]; 47 | int blynk_port; 48 | char board_name [24]; 49 | int checkSum; 50 | } Blynk_WM_Configuration; 51 | 52 | */ 53 | 54 | //bool LOAD_DEFAULT_CONFIG_DATA = true; 55 | bool LOAD_DEFAULT_CONFIG_DATA = false; 56 | 57 | Blynk_WM_Configuration defaultConfig = 58 | { 59 | //char header[16], dummy, not used 60 | #if USE_SSL 61 | "SSL", 62 | #else 63 | "NonSSL", 64 | #endif 65 | //WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS] 66 | //WiFi_Creds.wifi_ssid and WiFi_Creds.wifi_pw 67 | "SSID1", "password1", 68 | "SSID2", "password2", 69 | // Blynk_Credentials Blynk_Creds [NUM_BLYNK_CREDENTIALS]; 70 | // Blynk_Creds.blynk_server and Blynk_Creds.blynk_token 71 | "account.ddns.net", "token", 72 | "account.duckdns.org", "token1", 73 | //int blynk_port; 74 | #if USE_SSL 75 | 9443, 76 | #else 77 | 8080, 78 | #endif 79 | //char board_name [24]; 80 | "ESP8266-Async-Blynk", 81 | //int checkSum, dummy, not used 82 | 0 83 | }; 84 | 85 | /////////// End Default Config Data ///////////// 86 | 87 | 88 | #endif //Credentials_h 89 | -------------------------------------------------------------------------------- /examples/Async_ESP8266WM_MRD_Config/Credentials.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | Credentials.h 3 | For ESP8266 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef Credentials_h 14 | #define Credentials_h 15 | 16 | /// Start Default Config Data ////////////////// 17 | 18 | /* 19 | // Defined in and 20 | 21 | #define SSID_MAX_LEN 32 22 | #define PASS_MAX_LEN 64 23 | 24 | typedef struct 25 | { 26 | char wifi_ssid[SSID_MAX_LEN]; 27 | char wifi_pw [PASS_MAX_LEN]; 28 | } WiFi_Credentials; 29 | 30 | #define BLYNK_SERVER_MAX_LEN 32 31 | #define BLYNK_TOKEN_MAX_LEN 36 32 | 33 | typedef struct 34 | { 35 | char blynk_server[BLYNK_SERVER_MAX_LEN]; 36 | char blynk_token [BLYNK_TOKEN_MAX_LEN]; 37 | } Blynk_Credentials; 38 | 39 | #define NUM_WIFI_CREDENTIALS 2 40 | #define NUM_BLYNK_CREDENTIALS 2 41 | 42 | typedef struct Configuration 43 | { 44 | char header [16]; 45 | WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS]; 46 | Blynk_Credentials Blynk_Creds [NUM_BLYNK_CREDENTIALS]; 47 | int blynk_port; 48 | char board_name [24]; 49 | int checkSum; 50 | } Blynk_WM_Configuration; 51 | 52 | */ 53 | 54 | //bool LOAD_DEFAULT_CONFIG_DATA = true; 55 | bool LOAD_DEFAULT_CONFIG_DATA = false; 56 | 57 | Blynk_WM_Configuration defaultConfig = 58 | { 59 | //char header[16], dummy, not used 60 | #if USE_SSL 61 | "SSL", 62 | #else 63 | "NonSSL", 64 | #endif 65 | //WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS] 66 | //WiFi_Creds.wifi_ssid and WiFi_Creds.wifi_pw 67 | "SSID1", "password1", 68 | "SSID2", "password2", 69 | // Blynk_Credentials Blynk_Creds [NUM_BLYNK_CREDENTIALS]; 70 | // Blynk_Creds.blynk_server and Blynk_Creds.blynk_token 71 | "account.ddns.net", "token", 72 | "account.duckdns.org", "token1", 73 | //int blynk_port; 74 | #if USE_SSL 75 | 9443, 76 | #else 77 | 8080, 78 | #endif 79 | //char board_name [24]; 80 | "ESP8266-Async-Blynk", 81 | //int checkSum, dummy, not used 82 | 0 83 | }; 84 | 85 | /////////// End Default Config Data ///////////// 86 | 87 | 88 | #endif //Credentials_h 89 | -------------------------------------------------------------------------------- /examples/ESP32_MultiTask/AsyncMT_DHT11ESP32_SSL/Credentials.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | Credentials.h 3 | For ESP32 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef Credentials_h 14 | #define Credentials_h 15 | 16 | /// Start Default Config Data ////////////////// 17 | 18 | /* 19 | // Defined in and 20 | 21 | #define SSID_MAX_LEN 32 22 | #define PASS_MAX_LEN 64 23 | 24 | typedef struct 25 | { 26 | char wifi_ssid[SSID_MAX_LEN]; 27 | char wifi_pw [PASS_MAX_LEN]; 28 | } WiFi_Credentials; 29 | 30 | #define BLYNK_SERVER_MAX_LEN 32 31 | #define BLYNK_TOKEN_MAX_LEN 36 32 | 33 | typedef struct 34 | { 35 | char blynk_server[BLYNK_SERVER_MAX_LEN]; 36 | char blynk_token [BLYNK_TOKEN_MAX_LEN]; 37 | } Blynk_Credentials; 38 | 39 | #define NUM_WIFI_CREDENTIALS 2 40 | #define NUM_BLYNK_CREDENTIALS 2 41 | 42 | typedef struct Configuration 43 | { 44 | char header [16]; 45 | WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS]; 46 | Blynk_Credentials Blynk_Creds [NUM_BLYNK_CREDENTIALS]; 47 | int blynk_port; 48 | char board_name [24]; 49 | int checkSum; 50 | } Blynk_WM_Configuration; 51 | 52 | */ 53 | 54 | //bool LOAD_DEFAULT_CONFIG_DATA = true; 55 | bool LOAD_DEFAULT_CONFIG_DATA = false; 56 | 57 | Blynk_WM_Configuration defaultConfig = 58 | { 59 | //char header[16], dummy, not used 60 | #if USE_SSL 61 | "SSL", 62 | #else 63 | "NonSSL", 64 | #endif 65 | //WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS] 66 | //WiFi_Creds.wifi_ssid and WiFi_Creds.wifi_pw 67 | "SSID1", "password1", 68 | "SSID2", "password2", 69 | // Blynk_Credentials Blynk_Creds [NUM_BLYNK_CREDENTIALS]; 70 | // Blynk_Creds.blynk_server and Blynk_Creds.blynk_token 71 | "account.ddns.net", "token", 72 | "account.duckdns.org", "token1", 73 | //int blynk_port; 74 | #if USE_SSL 75 | 9443, 76 | #else 77 | 8080, 78 | #endif 79 | //char board_name [24]; 80 | "ESP32-Async-Blynk", 81 | //int checkSum, dummy, not used 82 | 0 83 | }; 84 | 85 | /////////// End Default Config Data ///////////// 86 | 87 | 88 | #endif //Credentials_h 89 | -------------------------------------------------------------------------------- /examples/ESP32_MultiTask/AsyncMT_ESP32WM_Config/Credentials.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | Credentials.h 3 | For ESP32 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef Credentials_h 14 | #define Credentials_h 15 | 16 | /// Start Default Config Data ////////////////// 17 | 18 | /* 19 | // Defined in and 20 | 21 | #define SSID_MAX_LEN 32 22 | #define PASS_MAX_LEN 64 23 | 24 | typedef struct 25 | { 26 | char wifi_ssid[SSID_MAX_LEN]; 27 | char wifi_pw [PASS_MAX_LEN]; 28 | } WiFi_Credentials; 29 | 30 | #define BLYNK_SERVER_MAX_LEN 32 31 | #define BLYNK_TOKEN_MAX_LEN 36 32 | 33 | typedef struct 34 | { 35 | char blynk_server[BLYNK_SERVER_MAX_LEN]; 36 | char blynk_token [BLYNK_TOKEN_MAX_LEN]; 37 | } Blynk_Credentials; 38 | 39 | #define NUM_WIFI_CREDENTIALS 2 40 | #define NUM_BLYNK_CREDENTIALS 2 41 | 42 | typedef struct Configuration 43 | { 44 | char header [16]; 45 | WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS]; 46 | Blynk_Credentials Blynk_Creds [NUM_BLYNK_CREDENTIALS]; 47 | int blynk_port; 48 | char board_name [24]; 49 | int checkSum; 50 | } Blynk_WM_Configuration; 51 | 52 | */ 53 | 54 | //bool LOAD_DEFAULT_CONFIG_DATA = true; 55 | bool LOAD_DEFAULT_CONFIG_DATA = false; 56 | 57 | Blynk_WM_Configuration defaultConfig = 58 | { 59 | //char header[16], dummy, not used 60 | #if USE_SSL 61 | "SSL", 62 | #else 63 | "NonSSL", 64 | #endif 65 | //WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS] 66 | //WiFi_Creds.wifi_ssid and WiFi_Creds.wifi_pw 67 | "SSID1", "password1", 68 | "SSID2", "password2", 69 | // Blynk_Credentials Blynk_Creds [NUM_BLYNK_CREDENTIALS]; 70 | // Blynk_Creds.blynk_server and Blynk_Creds.blynk_token 71 | "account.ddns.net", "token", 72 | "account.duckdns.org", "token1", 73 | //int blynk_port; 74 | #if USE_SSL 75 | 9443, 76 | #else 77 | 8080, 78 | #endif 79 | //char board_name [24]; 80 | "ESP32-Async-Blynk", 81 | //int checkSum, dummy, not used 82 | 0 83 | }; 84 | 85 | /////////// End Default Config Data ///////////// 86 | 87 | 88 | #endif //Credentials_h 89 | -------------------------------------------------------------------------------- /examples/ESP32_MultiTask/Async_ESP32_MultiTask/Credentials.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | Credentials.h 3 | For ESP32 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef Credentials_h 14 | #define Credentials_h 15 | 16 | /// Start Default Config Data ////////////////// 17 | 18 | /* 19 | // Defined in and 20 | 21 | #define SSID_MAX_LEN 32 22 | #define PASS_MAX_LEN 64 23 | 24 | typedef struct 25 | { 26 | char wifi_ssid[SSID_MAX_LEN]; 27 | char wifi_pw [PASS_MAX_LEN]; 28 | } WiFi_Credentials; 29 | 30 | #define BLYNK_SERVER_MAX_LEN 32 31 | #define BLYNK_TOKEN_MAX_LEN 36 32 | 33 | typedef struct 34 | { 35 | char blynk_server[BLYNK_SERVER_MAX_LEN]; 36 | char blynk_token [BLYNK_TOKEN_MAX_LEN]; 37 | } Blynk_Credentials; 38 | 39 | #define NUM_WIFI_CREDENTIALS 2 40 | #define NUM_BLYNK_CREDENTIALS 2 41 | 42 | typedef struct Configuration 43 | { 44 | char header [16]; 45 | WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS]; 46 | Blynk_Credentials Blynk_Creds [NUM_BLYNK_CREDENTIALS]; 47 | int blynk_port; 48 | char board_name [24]; 49 | int checkSum; 50 | } Blynk_WM_Configuration; 51 | 52 | */ 53 | 54 | //bool LOAD_DEFAULT_CONFIG_DATA = true; 55 | bool LOAD_DEFAULT_CONFIG_DATA = false; 56 | 57 | Blynk_WM_Configuration defaultConfig = 58 | { 59 | //char header[16], dummy, not used 60 | #if USE_SSL 61 | "SSL", 62 | #else 63 | "NonSSL", 64 | #endif 65 | //WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS] 66 | //WiFi_Creds.wifi_ssid and WiFi_Creds.wifi_pw 67 | "SSID1", "password1", 68 | "SSID2", "password2", 69 | // Blynk_Credentials Blynk_Creds [NUM_BLYNK_CREDENTIALS]; 70 | // Blynk_Creds.blynk_server and Blynk_Creds.blynk_token 71 | "account.ddns.net", "token1", 72 | "account.duckdns.org", "token2", 73 | //int blynk_port; 74 | #if USE_SSL 75 | 9443, 76 | #else 77 | 8080, 78 | #endif 79 | //char board_name [24]; 80 | "ESP32-Async-MTask", 81 | //int checkSum, dummy, not used 82 | 0 83 | }; 84 | 85 | /////////// End Default Config Data ///////////// 86 | 87 | 88 | #endif //Credentials_h 89 | -------------------------------------------------------------------------------- /examples/Async_ESP8266WM_MRD_ForcedConfig/Credentials.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | Credentials.h 3 | For ESP8266 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef Credentials_h 14 | #define Credentials_h 15 | 16 | /// Start Default Config Data ////////////////// 17 | 18 | /* 19 | // Defined in and 20 | 21 | #define SSID_MAX_LEN 32 22 | #define PASS_MAX_LEN 64 23 | 24 | typedef struct 25 | { 26 | char wifi_ssid[SSID_MAX_LEN]; 27 | char wifi_pw [PASS_MAX_LEN]; 28 | } WiFi_Credentials; 29 | 30 | #define BLYNK_SERVER_MAX_LEN 32 31 | #define BLYNK_TOKEN_MAX_LEN 36 32 | 33 | typedef struct 34 | { 35 | char blynk_server[BLYNK_SERVER_MAX_LEN]; 36 | char blynk_token [BLYNK_TOKEN_MAX_LEN]; 37 | } Blynk_Credentials; 38 | 39 | #define NUM_WIFI_CREDENTIALS 2 40 | #define NUM_BLYNK_CREDENTIALS 2 41 | 42 | typedef struct Configuration 43 | { 44 | char header [16]; 45 | WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS]; 46 | Blynk_Credentials Blynk_Creds [NUM_BLYNK_CREDENTIALS]; 47 | int blynk_port; 48 | char board_name [24]; 49 | int checkSum; 50 | } Blynk_WM_Configuration; 51 | 52 | */ 53 | 54 | //bool LOAD_DEFAULT_CONFIG_DATA = true; 55 | bool LOAD_DEFAULT_CONFIG_DATA = false; 56 | 57 | Blynk_WM_Configuration defaultConfig = 58 | { 59 | //char header[16], dummy, not used 60 | #if USE_SSL 61 | "SSL", 62 | #else 63 | "NonSSL", 64 | #endif 65 | //WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS] 66 | //WiFi_Creds.wifi_ssid and WiFi_Creds.wifi_pw 67 | "SSID1", "password1", 68 | "SSID2", "password2", 69 | // Blynk_Credentials Blynk_Creds [NUM_BLYNK_CREDENTIALS]; 70 | // Blynk_Creds.blynk_server and Blynk_Creds.blynk_token 71 | "account.ddns.net", "token", 72 | "account.duckdns.org", "token1", 73 | //int blynk_port; 74 | #if USE_SSL 75 | 9443, 76 | #else 77 | 8080, 78 | #endif 79 | //char board_name [24]; 80 | "ESP8266-Async-Blynk", 81 | //int checkSum, dummy, not used 82 | 0 83 | }; 84 | 85 | /////////// End Default Config Data ///////////// 86 | 87 | 88 | #endif //Credentials_h 89 | -------------------------------------------------------------------------------- /examples/ESP32_MultiTask/AsyncMT_AM2315_ESP32_SSL/Credentials.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | Credentials.h 3 | For ESP32 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef Credentials_h 14 | #define Credentials_h 15 | 16 | /// Start Default Config Data ////////////////// 17 | 18 | /* 19 | // Defined in and 20 | 21 | #define SSID_MAX_LEN 32 22 | #define PASS_MAX_LEN 64 23 | 24 | typedef struct 25 | { 26 | char wifi_ssid[SSID_MAX_LEN]; 27 | char wifi_pw [PASS_MAX_LEN]; 28 | } WiFi_Credentials; 29 | 30 | #define BLYNK_SERVER_MAX_LEN 32 31 | #define BLYNK_TOKEN_MAX_LEN 36 32 | 33 | typedef struct 34 | { 35 | char blynk_server[BLYNK_SERVER_MAX_LEN]; 36 | char blynk_token [BLYNK_TOKEN_MAX_LEN]; 37 | } Blynk_Credentials; 38 | 39 | #define NUM_WIFI_CREDENTIALS 2 40 | #define NUM_BLYNK_CREDENTIALS 2 41 | 42 | typedef struct Configuration 43 | { 44 | char header [16]; 45 | WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS]; 46 | Blynk_Credentials Blynk_Creds [NUM_BLYNK_CREDENTIALS]; 47 | int blynk_port; 48 | char board_name [24]; 49 | int checkSum; 50 | } Blynk_WM_Configuration; 51 | 52 | */ 53 | 54 | //bool LOAD_DEFAULT_CONFIG_DATA = true; 55 | bool LOAD_DEFAULT_CONFIG_DATA = false; 56 | 57 | Blynk_WM_Configuration defaultConfig = 58 | { 59 | //char header[16], dummy, not used 60 | #if USE_SSL 61 | "SSL", 62 | #else 63 | "NonSSL", 64 | #endif 65 | //WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS] 66 | //WiFi_Creds.wifi_ssid and WiFi_Creds.wifi_pw 67 | "SSID1", "password1", 68 | "SSID2", "password2", 69 | // Blynk_Credentials Blynk_Creds [NUM_BLYNK_CREDENTIALS]; 70 | // Blynk_Creds.blynk_server and Blynk_Creds.blynk_token 71 | "account.ddns.net", "token", 72 | "account.duckdns.org", "token1", 73 | //int blynk_port; 74 | #if USE_SSL 75 | 9443, 76 | #else 77 | 8080, 78 | #endif 79 | //char board_name [24]; 80 | "ESP32-Async-Blynk", 81 | //int checkSum, dummy, not used 82 | 0 83 | }; 84 | 85 | /////////// End Default Config Data ///////////// 86 | 87 | 88 | #endif //Credentials_h 89 | -------------------------------------------------------------------------------- /examples/ESP32_MultiTask/AsyncMT_ESP32WM_ForcedConfig/Credentials.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | Credentials.h 3 | For ESP32 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef Credentials_h 14 | #define Credentials_h 15 | 16 | /// Start Default Config Data ////////////////// 17 | 18 | /* 19 | // Defined in and 20 | 21 | #define SSID_MAX_LEN 32 22 | #define PASS_MAX_LEN 64 23 | 24 | typedef struct 25 | { 26 | char wifi_ssid[SSID_MAX_LEN]; 27 | char wifi_pw [PASS_MAX_LEN]; 28 | } WiFi_Credentials; 29 | 30 | #define BLYNK_SERVER_MAX_LEN 32 31 | #define BLYNK_TOKEN_MAX_LEN 36 32 | 33 | typedef struct 34 | { 35 | char blynk_server[BLYNK_SERVER_MAX_LEN]; 36 | char blynk_token [BLYNK_TOKEN_MAX_LEN]; 37 | } Blynk_Credentials; 38 | 39 | #define NUM_WIFI_CREDENTIALS 2 40 | #define NUM_BLYNK_CREDENTIALS 2 41 | 42 | typedef struct Configuration 43 | { 44 | char header [16]; 45 | WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS]; 46 | Blynk_Credentials Blynk_Creds [NUM_BLYNK_CREDENTIALS]; 47 | int blynk_port; 48 | char board_name [24]; 49 | int checkSum; 50 | } Blynk_WM_Configuration; 51 | 52 | */ 53 | 54 | //bool LOAD_DEFAULT_CONFIG_DATA = true; 55 | bool LOAD_DEFAULT_CONFIG_DATA = false; 56 | 57 | Blynk_WM_Configuration defaultConfig = 58 | { 59 | //char header[16], dummy, not used 60 | #if USE_SSL 61 | "SSL", 62 | #else 63 | "NonSSL", 64 | #endif 65 | //WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS] 66 | //WiFi_Creds.wifi_ssid and WiFi_Creds.wifi_pw 67 | "SSID1", "password1", 68 | "SSID2", "password2", 69 | // Blynk_Credentials Blynk_Creds [NUM_BLYNK_CREDENTIALS]; 70 | // Blynk_Creds.blynk_server and Blynk_Creds.blynk_token 71 | "account.ddns.net", "token", 72 | "account.duckdns.org", "token1", 73 | //int blynk_port; 74 | #if USE_SSL 75 | 9443, 76 | #else 77 | 8080, 78 | #endif 79 | //char board_name [24]; 80 | "ESP32-Async-Blynk", 81 | //int checkSum, dummy, not used 82 | 0 83 | }; 84 | 85 | /////////// End Default Config Data ///////////// 86 | 87 | 88 | #endif //Credentials_h 89 | -------------------------------------------------------------------------------- /examples/Async_DHT11ESP8266/dynamicParams.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | dynamicParams.h 3 | For ESP8266 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef dynamicParams_h 14 | #define dynamicParams_h 15 | 16 | // USE_DYNAMIC_PARAMETERS defined in defined.h 17 | 18 | /////////////// Start dynamic Credentials /////////////// 19 | 20 | //Defined in and 21 | /************************************** 22 | #define MAX_ID_LEN 5 23 | #define MAX_DISPLAY_NAME_LEN 16 24 | 25 | typedef struct 26 | { 27 | char id [MAX_ID_LEN + 1]; 28 | char displayName [MAX_DISPLAY_NAME_LEN + 1]; 29 | char *pdata; 30 | uint8_t maxlen; 31 | } MenuItem; 32 | **************************************/ 33 | 34 | #if USE_DYNAMIC_PARAMETERS 35 | 36 | #define MAX_MQTT_SERVER_LEN 34 37 | char MQTT_Server [MAX_MQTT_SERVER_LEN + 1] = "default-mqtt-server"; 38 | 39 | #define MAX_MQTT_PORT_LEN 6 40 | char MQTT_Port [MAX_MQTT_PORT_LEN + 1] = "1883"; 41 | 42 | #define MAX_MQTT_USERNAME_LEN 34 43 | char MQTT_UserName [MAX_MQTT_USERNAME_LEN + 1] = "default-mqtt-username"; 44 | 45 | #define MAX_MQTT_PW_LEN 34 46 | char MQTT_PW [MAX_MQTT_PW_LEN + 1] = "default-mqtt-password"; 47 | 48 | #define MAX_MQTT_SUBS_TOPIC_LEN 34 49 | char MQTT_SubsTopic [MAX_MQTT_SUBS_TOPIC_LEN + 1] = "default-mqtt-SubTopic"; 50 | 51 | #define MAX_MQTT_PUB_TOPIC_LEN 34 52 | char MQTT_PubTopic [MAX_MQTT_PUB_TOPIC_LEN + 1] = "default-mqtt-PubTopic"; 53 | 54 | MenuItem myMenuItems [] = 55 | { 56 | { "mqtt", "MQTT Server", MQTT_Server, MAX_MQTT_SERVER_LEN }, 57 | { "mqpt", "Port", MQTT_Port, MAX_MQTT_PORT_LEN }, 58 | { "user", "MQTT UserName", MQTT_UserName, MAX_MQTT_USERNAME_LEN }, 59 | { "mqpw", "MQTT PWD", MQTT_PW, MAX_MQTT_PW_LEN }, 60 | { "subs", "Subs Topics", MQTT_SubsTopic, MAX_MQTT_SUBS_TOPIC_LEN }, 61 | { "pubs", "Pubs Topics", MQTT_PubTopic, MAX_MQTT_PUB_TOPIC_LEN }, 62 | }; 63 | 64 | uint16_t NUM_MENU_ITEMS = sizeof(myMenuItems) / sizeof(MenuItem); //MenuItemSize; 65 | 66 | #else 67 | 68 | MenuItem myMenuItems [] = {}; 69 | 70 | uint16_t NUM_MENU_ITEMS = 0; 71 | #endif 72 | 73 | 74 | /////// // End dynamic Credentials /////////// 75 | 76 | #endif //dynamicParams_h 77 | -------------------------------------------------------------------------------- /examples/Async_AM2315_ESP8266/dynamicParams.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | dynamicParams.h 3 | For ESP8266 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef dynamicParams_h 14 | #define dynamicParams_h 15 | 16 | // USE_DYNAMIC_PARAMETERS defined in defined.h 17 | 18 | /////////////// Start dynamic Credentials /////////////// 19 | 20 | //Defined in and 21 | /************************************** 22 | #define MAX_ID_LEN 5 23 | #define MAX_DISPLAY_NAME_LEN 16 24 | 25 | typedef struct 26 | { 27 | char id [MAX_ID_LEN + 1]; 28 | char displayName [MAX_DISPLAY_NAME_LEN + 1]; 29 | char *pdata; 30 | uint8_t maxlen; 31 | } MenuItem; 32 | **************************************/ 33 | 34 | #if USE_DYNAMIC_PARAMETERS 35 | 36 | #define MAX_MQTT_SERVER_LEN 34 37 | char MQTT_Server [MAX_MQTT_SERVER_LEN + 1] = "default-mqtt-server"; 38 | 39 | #define MAX_MQTT_PORT_LEN 6 40 | char MQTT_Port [MAX_MQTT_PORT_LEN + 1] = "1883"; 41 | 42 | #define MAX_MQTT_USERNAME_LEN 34 43 | char MQTT_UserName [MAX_MQTT_USERNAME_LEN + 1] = "default-mqtt-username"; 44 | 45 | #define MAX_MQTT_PW_LEN 34 46 | char MQTT_PW [MAX_MQTT_PW_LEN + 1] = "default-mqtt-password"; 47 | 48 | #define MAX_MQTT_SUBS_TOPIC_LEN 34 49 | char MQTT_SubsTopic [MAX_MQTT_SUBS_TOPIC_LEN + 1] = "default-mqtt-SubTopic"; 50 | 51 | #define MAX_MQTT_PUB_TOPIC_LEN 34 52 | char MQTT_PubTopic [MAX_MQTT_PUB_TOPIC_LEN + 1] = "default-mqtt-PubTopic"; 53 | 54 | MenuItem myMenuItems [] = 55 | { 56 | { "mqtt", "MQTT Server", MQTT_Server, MAX_MQTT_SERVER_LEN }, 57 | { "mqpt", "Port", MQTT_Port, MAX_MQTT_PORT_LEN }, 58 | { "user", "MQTT UserName", MQTT_UserName, MAX_MQTT_USERNAME_LEN }, 59 | { "mqpw", "MQTT PWD", MQTT_PW, MAX_MQTT_PW_LEN }, 60 | { "subs", "Subs Topics", MQTT_SubsTopic, MAX_MQTT_SUBS_TOPIC_LEN }, 61 | { "pubs", "Pubs Topics", MQTT_PubTopic, MAX_MQTT_PUB_TOPIC_LEN }, 62 | }; 63 | 64 | uint16_t NUM_MENU_ITEMS = sizeof(myMenuItems) / sizeof(MenuItem); //MenuItemSize; 65 | 66 | #else 67 | 68 | MenuItem myMenuItems [] = {}; 69 | 70 | uint16_t NUM_MENU_ITEMS = 0; 71 | #endif 72 | 73 | 74 | /////// // End dynamic Credentials /////////// 75 | 76 | #endif //dynamicParams_h 77 | -------------------------------------------------------------------------------- /examples/Async_DHT11ESP8266_SSL/dynamicParams.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | dynamicParams.h 3 | For ESP8266 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef dynamicParams_h 14 | #define dynamicParams_h 15 | 16 | // USE_DYNAMIC_PARAMETERS defined in defined.h 17 | 18 | /////////////// Start dynamic Credentials /////////////// 19 | 20 | //Defined in and 21 | /************************************** 22 | #define MAX_ID_LEN 5 23 | #define MAX_DISPLAY_NAME_LEN 16 24 | 25 | typedef struct 26 | { 27 | char id [MAX_ID_LEN + 1]; 28 | char displayName [MAX_DISPLAY_NAME_LEN + 1]; 29 | char *pdata; 30 | uint8_t maxlen; 31 | } MenuItem; 32 | **************************************/ 33 | 34 | #if USE_DYNAMIC_PARAMETERS 35 | 36 | #define MAX_MQTT_SERVER_LEN 34 37 | char MQTT_Server [MAX_MQTT_SERVER_LEN + 1] = "default-mqtt-server"; 38 | 39 | #define MAX_MQTT_PORT_LEN 6 40 | char MQTT_Port [MAX_MQTT_PORT_LEN + 1] = "1883"; 41 | 42 | #define MAX_MQTT_USERNAME_LEN 34 43 | char MQTT_UserName [MAX_MQTT_USERNAME_LEN + 1] = "default-mqtt-username"; 44 | 45 | #define MAX_MQTT_PW_LEN 34 46 | char MQTT_PW [MAX_MQTT_PW_LEN + 1] = "default-mqtt-password"; 47 | 48 | #define MAX_MQTT_SUBS_TOPIC_LEN 34 49 | char MQTT_SubsTopic [MAX_MQTT_SUBS_TOPIC_LEN + 1] = "default-mqtt-SubTopic"; 50 | 51 | #define MAX_MQTT_PUB_TOPIC_LEN 34 52 | char MQTT_PubTopic [MAX_MQTT_PUB_TOPIC_LEN + 1] = "default-mqtt-PubTopic"; 53 | 54 | MenuItem myMenuItems [] = 55 | { 56 | { "mqtt", "MQTT Server", MQTT_Server, MAX_MQTT_SERVER_LEN }, 57 | { "mqpt", "Port", MQTT_Port, MAX_MQTT_PORT_LEN }, 58 | { "user", "MQTT UserName", MQTT_UserName, MAX_MQTT_USERNAME_LEN }, 59 | { "mqpw", "MQTT PWD", MQTT_PW, MAX_MQTT_PW_LEN }, 60 | { "subs", "Subs Topics", MQTT_SubsTopic, MAX_MQTT_SUBS_TOPIC_LEN }, 61 | { "pubs", "Pubs Topics", MQTT_PubTopic, MAX_MQTT_PUB_TOPIC_LEN }, 62 | }; 63 | 64 | uint16_t NUM_MENU_ITEMS = sizeof(myMenuItems) / sizeof(MenuItem); //MenuItemSize; 65 | 66 | #else 67 | 68 | MenuItem myMenuItems [] = {}; 69 | 70 | uint16_t NUM_MENU_ITEMS = 0; 71 | #endif 72 | 73 | 74 | /////// // End dynamic Credentials /////////// 75 | 76 | #endif //dynamicParams_h 77 | -------------------------------------------------------------------------------- /examples/Async_ESP8266WM_Config/dynamicParams.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | dynamicParams.h 3 | For ESP8266 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef dynamicParams_h 14 | #define dynamicParams_h 15 | 16 | // USE_DYNAMIC_PARAMETERS defined in defined.h 17 | 18 | /////////////// Start dynamic Credentials /////////////// 19 | 20 | //Defined in and 21 | /************************************** 22 | #define MAX_ID_LEN 5 23 | #define MAX_DISPLAY_NAME_LEN 16 24 | 25 | typedef struct 26 | { 27 | char id [MAX_ID_LEN + 1]; 28 | char displayName [MAX_DISPLAY_NAME_LEN + 1]; 29 | char *pdata; 30 | uint8_t maxlen; 31 | } MenuItem; 32 | **************************************/ 33 | 34 | #if USE_DYNAMIC_PARAMETERS 35 | 36 | #define MAX_MQTT_SERVER_LEN 34 37 | char MQTT_Server [MAX_MQTT_SERVER_LEN + 1] = "default-mqtt-server"; 38 | 39 | #define MAX_MQTT_PORT_LEN 6 40 | char MQTT_Port [MAX_MQTT_PORT_LEN + 1] = "1883"; 41 | 42 | #define MAX_MQTT_USERNAME_LEN 34 43 | char MQTT_UserName [MAX_MQTT_USERNAME_LEN + 1] = "default-mqtt-username"; 44 | 45 | #define MAX_MQTT_PW_LEN 34 46 | char MQTT_PW [MAX_MQTT_PW_LEN + 1] = "default-mqtt-password"; 47 | 48 | #define MAX_MQTT_SUBS_TOPIC_LEN 34 49 | char MQTT_SubsTopic [MAX_MQTT_SUBS_TOPIC_LEN + 1] = "default-mqtt-SubTopic"; 50 | 51 | #define MAX_MQTT_PUB_TOPIC_LEN 34 52 | char MQTT_PubTopic [MAX_MQTT_PUB_TOPIC_LEN + 1] = "default-mqtt-PubTopic"; 53 | 54 | MenuItem myMenuItems [] = 55 | { 56 | { "mqtt", "MQTT Server", MQTT_Server, MAX_MQTT_SERVER_LEN }, 57 | { "mqpt", "Port", MQTT_Port, MAX_MQTT_PORT_LEN }, 58 | { "user", "MQTT UserName", MQTT_UserName, MAX_MQTT_USERNAME_LEN }, 59 | { "mqpw", "MQTT PWD", MQTT_PW, MAX_MQTT_PW_LEN }, 60 | { "subs", "Subs Topics", MQTT_SubsTopic, MAX_MQTT_SUBS_TOPIC_LEN }, 61 | { "pubs", "Pubs Topics", MQTT_PubTopic, MAX_MQTT_PUB_TOPIC_LEN }, 62 | }; 63 | 64 | uint16_t NUM_MENU_ITEMS = sizeof(myMenuItems) / sizeof(MenuItem); //MenuItemSize; 65 | 66 | #else 67 | 68 | MenuItem myMenuItems [] = {}; 69 | 70 | uint16_t NUM_MENU_ITEMS = 0; 71 | #endif 72 | 73 | 74 | /////// // End dynamic Credentials /////////// 75 | 76 | #endif //dynamicParams_h 77 | -------------------------------------------------------------------------------- /examples/Async_DHT11ESP8266_Debug/dynamicParams.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | dynamicParams.h 3 | For ESP8266 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef dynamicParams_h 14 | #define dynamicParams_h 15 | 16 | // USE_DYNAMIC_PARAMETERS defined in defined.h 17 | 18 | /////////////// Start dynamic Credentials /////////////// 19 | 20 | //Defined in and 21 | /************************************** 22 | #define MAX_ID_LEN 5 23 | #define MAX_DISPLAY_NAME_LEN 16 24 | 25 | typedef struct 26 | { 27 | char id [MAX_ID_LEN + 1]; 28 | char displayName [MAX_DISPLAY_NAME_LEN + 1]; 29 | char *pdata; 30 | uint8_t maxlen; 31 | } MenuItem; 32 | **************************************/ 33 | 34 | #if USE_DYNAMIC_PARAMETERS 35 | 36 | #define MAX_MQTT_SERVER_LEN 34 37 | char MQTT_Server [MAX_MQTT_SERVER_LEN + 1] = "default-mqtt-server"; 38 | 39 | #define MAX_MQTT_PORT_LEN 6 40 | char MQTT_Port [MAX_MQTT_PORT_LEN + 1] = "1883"; 41 | 42 | #define MAX_MQTT_USERNAME_LEN 34 43 | char MQTT_UserName [MAX_MQTT_USERNAME_LEN + 1] = "default-mqtt-username"; 44 | 45 | #define MAX_MQTT_PW_LEN 34 46 | char MQTT_PW [MAX_MQTT_PW_LEN + 1] = "default-mqtt-password"; 47 | 48 | #define MAX_MQTT_SUBS_TOPIC_LEN 34 49 | char MQTT_SubsTopic [MAX_MQTT_SUBS_TOPIC_LEN + 1] = "default-mqtt-SubTopic"; 50 | 51 | #define MAX_MQTT_PUB_TOPIC_LEN 34 52 | char MQTT_PubTopic [MAX_MQTT_PUB_TOPIC_LEN + 1] = "default-mqtt-PubTopic"; 53 | 54 | MenuItem myMenuItems [] = 55 | { 56 | { "mqtt", "MQTT Server", MQTT_Server, MAX_MQTT_SERVER_LEN }, 57 | { "mqpt", "Port", MQTT_Port, MAX_MQTT_PORT_LEN }, 58 | { "user", "MQTT UserName", MQTT_UserName, MAX_MQTT_USERNAME_LEN }, 59 | { "mqpw", "MQTT PWD", MQTT_PW, MAX_MQTT_PW_LEN }, 60 | { "subs", "Subs Topics", MQTT_SubsTopic, MAX_MQTT_SUBS_TOPIC_LEN }, 61 | { "pubs", "Pubs Topics", MQTT_PubTopic, MAX_MQTT_PUB_TOPIC_LEN }, 62 | }; 63 | 64 | uint16_t NUM_MENU_ITEMS = sizeof(myMenuItems) / sizeof(MenuItem); //MenuItemSize; 65 | 66 | #else 67 | 68 | MenuItem myMenuItems [] = {}; 69 | 70 | uint16_t NUM_MENU_ITEMS = 0; 71 | #endif 72 | 73 | 74 | /////// // End dynamic Credentials /////////// 75 | 76 | #endif //dynamicParams_h 77 | -------------------------------------------------------------------------------- /examples/Async_ESP8266WM_MRD_Config/dynamicParams.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | dynamicParams.h 3 | For ESP8266 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef dynamicParams_h 14 | #define dynamicParams_h 15 | 16 | // USE_DYNAMIC_PARAMETERS defined in defined.h 17 | 18 | /////////////// Start dynamic Credentials /////////////// 19 | 20 | //Defined in and 21 | /************************************** 22 | #define MAX_ID_LEN 5 23 | #define MAX_DISPLAY_NAME_LEN 16 24 | 25 | typedef struct 26 | { 27 | char id [MAX_ID_LEN + 1]; 28 | char displayName [MAX_DISPLAY_NAME_LEN + 1]; 29 | char *pdata; 30 | uint8_t maxlen; 31 | } MenuItem; 32 | **************************************/ 33 | 34 | #if USE_DYNAMIC_PARAMETERS 35 | 36 | #define MAX_MQTT_SERVER_LEN 34 37 | char MQTT_Server [MAX_MQTT_SERVER_LEN + 1] = "default-mqtt-server"; 38 | 39 | #define MAX_MQTT_PORT_LEN 6 40 | char MQTT_Port [MAX_MQTT_PORT_LEN + 1] = "1883"; 41 | 42 | #define MAX_MQTT_USERNAME_LEN 34 43 | char MQTT_UserName [MAX_MQTT_USERNAME_LEN + 1] = "default-mqtt-username"; 44 | 45 | #define MAX_MQTT_PW_LEN 34 46 | char MQTT_PW [MAX_MQTT_PW_LEN + 1] = "default-mqtt-password"; 47 | 48 | #define MAX_MQTT_SUBS_TOPIC_LEN 34 49 | char MQTT_SubsTopic [MAX_MQTT_SUBS_TOPIC_LEN + 1] = "default-mqtt-SubTopic"; 50 | 51 | #define MAX_MQTT_PUB_TOPIC_LEN 34 52 | char MQTT_PubTopic [MAX_MQTT_PUB_TOPIC_LEN + 1] = "default-mqtt-PubTopic"; 53 | 54 | MenuItem myMenuItems [] = 55 | { 56 | { "mqtt", "MQTT Server", MQTT_Server, MAX_MQTT_SERVER_LEN }, 57 | { "mqpt", "Port", MQTT_Port, MAX_MQTT_PORT_LEN }, 58 | { "user", "MQTT UserName", MQTT_UserName, MAX_MQTT_USERNAME_LEN }, 59 | { "mqpw", "MQTT PWD", MQTT_PW, MAX_MQTT_PW_LEN }, 60 | { "subs", "Subs Topics", MQTT_SubsTopic, MAX_MQTT_SUBS_TOPIC_LEN }, 61 | { "pubs", "Pubs Topics", MQTT_PubTopic, MAX_MQTT_PUB_TOPIC_LEN }, 62 | }; 63 | 64 | uint16_t NUM_MENU_ITEMS = sizeof(myMenuItems) / sizeof(MenuItem); //MenuItemSize; 65 | 66 | #else 67 | 68 | MenuItem myMenuItems [] = {}; 69 | 70 | uint16_t NUM_MENU_ITEMS = 0; 71 | #endif 72 | 73 | 74 | /////// // End dynamic Credentials /////////// 75 | 76 | #endif //dynamicParams_h 77 | -------------------------------------------------------------------------------- /examples/Async_ESP8266WM_ForcedConfig/dynamicParams.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | dynamicParams.h 3 | For ESP8266 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef dynamicParams_h 14 | #define dynamicParams_h 15 | 16 | // USE_DYNAMIC_PARAMETERS defined in defined.h 17 | 18 | /////////////// Start dynamic Credentials /////////////// 19 | 20 | //Defined in and 21 | /************************************** 22 | #define MAX_ID_LEN 5 23 | #define MAX_DISPLAY_NAME_LEN 16 24 | 25 | typedef struct 26 | { 27 | char id [MAX_ID_LEN + 1]; 28 | char displayName [MAX_DISPLAY_NAME_LEN + 1]; 29 | char *pdata; 30 | uint8_t maxlen; 31 | } MenuItem; 32 | **************************************/ 33 | 34 | #if USE_DYNAMIC_PARAMETERS 35 | 36 | #define MAX_MQTT_SERVER_LEN 34 37 | char MQTT_Server [MAX_MQTT_SERVER_LEN + 1] = "default-mqtt-server"; 38 | 39 | #define MAX_MQTT_PORT_LEN 6 40 | char MQTT_Port [MAX_MQTT_PORT_LEN + 1] = "1883"; 41 | 42 | #define MAX_MQTT_USERNAME_LEN 34 43 | char MQTT_UserName [MAX_MQTT_USERNAME_LEN + 1] = "default-mqtt-username"; 44 | 45 | #define MAX_MQTT_PW_LEN 34 46 | char MQTT_PW [MAX_MQTT_PW_LEN + 1] = "default-mqtt-password"; 47 | 48 | #define MAX_MQTT_SUBS_TOPIC_LEN 34 49 | char MQTT_SubsTopic [MAX_MQTT_SUBS_TOPIC_LEN + 1] = "default-mqtt-SubTopic"; 50 | 51 | #define MAX_MQTT_PUB_TOPIC_LEN 34 52 | char MQTT_PubTopic [MAX_MQTT_PUB_TOPIC_LEN + 1] = "default-mqtt-PubTopic"; 53 | 54 | MenuItem myMenuItems [] = 55 | { 56 | { "mqtt", "MQTT Server", MQTT_Server, MAX_MQTT_SERVER_LEN }, 57 | { "mqpt", "Port", MQTT_Port, MAX_MQTT_PORT_LEN }, 58 | { "user", "MQTT UserName", MQTT_UserName, MAX_MQTT_USERNAME_LEN }, 59 | { "mqpw", "MQTT PWD", MQTT_PW, MAX_MQTT_PW_LEN }, 60 | { "subs", "Subs Topics", MQTT_SubsTopic, MAX_MQTT_SUBS_TOPIC_LEN }, 61 | { "pubs", "Pubs Topics", MQTT_PubTopic, MAX_MQTT_PUB_TOPIC_LEN }, 62 | }; 63 | 64 | uint16_t NUM_MENU_ITEMS = sizeof(myMenuItems) / sizeof(MenuItem); //MenuItemSize; 65 | 66 | #else 67 | 68 | MenuItem myMenuItems [] = {}; 69 | 70 | uint16_t NUM_MENU_ITEMS = 0; 71 | #endif 72 | 73 | 74 | /////// // End dynamic Credentials /////////// 75 | 76 | #endif //dynamicParams_h 77 | -------------------------------------------------------------------------------- /examples/Async_ESP8266WM_MRD_ForcedConfig/dynamicParams.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | dynamicParams.h 3 | For ESP8266 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef dynamicParams_h 14 | #define dynamicParams_h 15 | 16 | // USE_DYNAMIC_PARAMETERS defined in defined.h 17 | 18 | /////////////// Start dynamic Credentials /////////////// 19 | 20 | //Defined in and 21 | /************************************** 22 | #define MAX_ID_LEN 5 23 | #define MAX_DISPLAY_NAME_LEN 16 24 | 25 | typedef struct 26 | { 27 | char id [MAX_ID_LEN + 1]; 28 | char displayName [MAX_DISPLAY_NAME_LEN + 1]; 29 | char *pdata; 30 | uint8_t maxlen; 31 | } MenuItem; 32 | **************************************/ 33 | 34 | #if USE_DYNAMIC_PARAMETERS 35 | 36 | #define MAX_MQTT_SERVER_LEN 34 37 | char MQTT_Server [MAX_MQTT_SERVER_LEN + 1] = "default-mqtt-server"; 38 | 39 | #define MAX_MQTT_PORT_LEN 6 40 | char MQTT_Port [MAX_MQTT_PORT_LEN + 1] = "1883"; 41 | 42 | #define MAX_MQTT_USERNAME_LEN 34 43 | char MQTT_UserName [MAX_MQTT_USERNAME_LEN + 1] = "default-mqtt-username"; 44 | 45 | #define MAX_MQTT_PW_LEN 34 46 | char MQTT_PW [MAX_MQTT_PW_LEN + 1] = "default-mqtt-password"; 47 | 48 | #define MAX_MQTT_SUBS_TOPIC_LEN 34 49 | char MQTT_SubsTopic [MAX_MQTT_SUBS_TOPIC_LEN + 1] = "default-mqtt-SubTopic"; 50 | 51 | #define MAX_MQTT_PUB_TOPIC_LEN 34 52 | char MQTT_PubTopic [MAX_MQTT_PUB_TOPIC_LEN + 1] = "default-mqtt-PubTopic"; 53 | 54 | MenuItem myMenuItems [] = 55 | { 56 | { "mqtt", "MQTT Server", MQTT_Server, MAX_MQTT_SERVER_LEN }, 57 | { "mqpt", "Port", MQTT_Port, MAX_MQTT_PORT_LEN }, 58 | { "user", "MQTT UserName", MQTT_UserName, MAX_MQTT_USERNAME_LEN }, 59 | { "mqpw", "MQTT PWD", MQTT_PW, MAX_MQTT_PW_LEN }, 60 | { "subs", "Subs Topics", MQTT_SubsTopic, MAX_MQTT_SUBS_TOPIC_LEN }, 61 | { "pubs", "Pubs Topics", MQTT_PubTopic, MAX_MQTT_PUB_TOPIC_LEN }, 62 | }; 63 | 64 | uint16_t NUM_MENU_ITEMS = sizeof(myMenuItems) / sizeof(MenuItem); //MenuItemSize; 65 | 66 | #else 67 | 68 | MenuItem myMenuItems [] = {}; 69 | 70 | uint16_t NUM_MENU_ITEMS = 0; 71 | #endif 72 | 73 | 74 | /////// // End dynamic Credentials /////////// 75 | 76 | #endif //dynamicParams_h 77 | -------------------------------------------------------------------------------- /examples/Async_DHT11ESP32/dynamicParams.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | dynamicParams.h 3 | For ESP32 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef dynamicParams_h 14 | #define dynamicParams_h 15 | 16 | // USE_DYNAMIC_PARAMETERS defined in defined.h 17 | 18 | /////////////// Start dynamic Credentials /////////////// 19 | 20 | //Defined in and 21 | /************************************** 22 | #define MAX_ID_LEN 5 23 | #define MAX_DISPLAY_NAME_LEN 16 24 | 25 | typedef struct 26 | { 27 | char id [MAX_ID_LEN + 1]; 28 | char displayName [MAX_DISPLAY_NAME_LEN + 1]; 29 | char *pdata; 30 | uint8_t maxlen; 31 | } MenuItem; 32 | **************************************/ 33 | 34 | #if USE_DYNAMIC_PARAMETERS 35 | 36 | #define MAX_MQTT_SERVER_LEN 34 37 | char MQTT_Server [MAX_MQTT_SERVER_LEN + 1] = "default-mqtt-server"; 38 | 39 | #define MAX_MQTT_PORT_LEN 6 40 | char MQTT_Port [MAX_MQTT_PORT_LEN + 1] = "1883"; 41 | 42 | #define MAX_MQTT_USERNAME_LEN 34 43 | char MQTT_UserName [MAX_MQTT_USERNAME_LEN + 1] = "default-mqtt-username"; 44 | 45 | #define MAX_MQTT_PW_LEN 34 46 | char MQTT_PW [MAX_MQTT_PW_LEN + 1] = "default-mqtt-password"; 47 | 48 | #define MAX_MQTT_SUBS_TOPIC_LEN 34 49 | char MQTT_SubsTopic [MAX_MQTT_SUBS_TOPIC_LEN + 1] = "default-mqtt-SubTopic"; 50 | 51 | #define MAX_MQTT_PUB_TOPIC_LEN 34 52 | char MQTT_PubTopic [MAX_MQTT_PUB_TOPIC_LEN + 1] = "default-mqtt-PubTopic"; 53 | 54 | MenuItem myMenuItems [] = 55 | { 56 | { "mqtt", "MQTT Server", MQTT_Server, MAX_MQTT_SERVER_LEN }, 57 | { "mqpt", "Port", MQTT_Port, MAX_MQTT_PORT_LEN }, 58 | { "user", "MQTT UserName", MQTT_UserName, MAX_MQTT_USERNAME_LEN }, 59 | { "mqpw", "MQTT PWD", MQTT_PW, MAX_MQTT_PW_LEN }, 60 | { "subs", "Subs Topics", MQTT_SubsTopic, MAX_MQTT_SUBS_TOPIC_LEN }, 61 | { "pubs", "Pubs Topics", MQTT_PubTopic, MAX_MQTT_PUB_TOPIC_LEN }, 62 | }; 63 | 64 | uint16_t NUM_MENU_ITEMS = sizeof(myMenuItems) / sizeof(MenuItem); //MenuItemSize; 65 | 66 | #else 67 | 68 | MenuItem myMenuItems [] = {}; 69 | 70 | uint16_t NUM_MENU_ITEMS = 0; 71 | #endif 72 | 73 | 74 | /////// // End dynamic Credentials /////////// 75 | 76 | #endif //dynamicParams_h 77 | -------------------------------------------------------------------------------- /examples/Async_DHT11ESP32_SSL/dynamicParams.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | dynamicParams.h 3 | For ESP32 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef dynamicParams_h 14 | #define dynamicParams_h 15 | 16 | // USE_DYNAMIC_PARAMETERS defined in defined.h 17 | 18 | /////////////// Start dynamic Credentials /////////////// 19 | 20 | //Defined in and 21 | /************************************** 22 | #define MAX_ID_LEN 5 23 | #define MAX_DISPLAY_NAME_LEN 16 24 | 25 | typedef struct 26 | { 27 | char id [MAX_ID_LEN + 1]; 28 | char displayName [MAX_DISPLAY_NAME_LEN + 1]; 29 | char *pdata; 30 | uint8_t maxlen; 31 | } MenuItem; 32 | **************************************/ 33 | 34 | #if USE_DYNAMIC_PARAMETERS 35 | 36 | #define MAX_MQTT_SERVER_LEN 34 37 | char MQTT_Server [MAX_MQTT_SERVER_LEN + 1] = "default-mqtt-server"; 38 | 39 | #define MAX_MQTT_PORT_LEN 6 40 | char MQTT_Port [MAX_MQTT_PORT_LEN + 1] = "1883"; 41 | 42 | #define MAX_MQTT_USERNAME_LEN 34 43 | char MQTT_UserName [MAX_MQTT_USERNAME_LEN + 1] = "default-mqtt-username"; 44 | 45 | #define MAX_MQTT_PW_LEN 34 46 | char MQTT_PW [MAX_MQTT_PW_LEN + 1] = "default-mqtt-password"; 47 | 48 | #define MAX_MQTT_SUBS_TOPIC_LEN 34 49 | char MQTT_SubsTopic [MAX_MQTT_SUBS_TOPIC_LEN + 1] = "default-mqtt-SubTopic"; 50 | 51 | #define MAX_MQTT_PUB_TOPIC_LEN 34 52 | char MQTT_PubTopic [MAX_MQTT_PUB_TOPIC_LEN + 1] = "default-mqtt-PubTopic"; 53 | 54 | MenuItem myMenuItems [] = 55 | { 56 | { "mqtt", "MQTT Server", MQTT_Server, MAX_MQTT_SERVER_LEN }, 57 | { "mqpt", "Port", MQTT_Port, MAX_MQTT_PORT_LEN }, 58 | { "user", "MQTT UserName", MQTT_UserName, MAX_MQTT_USERNAME_LEN }, 59 | { "mqpw", "MQTT PWD", MQTT_PW, MAX_MQTT_PW_LEN }, 60 | { "subs", "Subs Topics", MQTT_SubsTopic, MAX_MQTT_SUBS_TOPIC_LEN }, 61 | { "pubs", "Pubs Topics", MQTT_PubTopic, MAX_MQTT_PUB_TOPIC_LEN }, 62 | }; 63 | 64 | uint16_t NUM_MENU_ITEMS = sizeof(myMenuItems) / sizeof(MenuItem); //MenuItemSize; 65 | 66 | #else 67 | 68 | MenuItem myMenuItems [] = {}; 69 | 70 | uint16_t NUM_MENU_ITEMS = 0; 71 | #endif 72 | 73 | 74 | /////// // End dynamic Credentials /////////// 75 | 76 | #endif //dynamicParams_h 77 | -------------------------------------------------------------------------------- /examples/Async_AM2315_ESP32_SSL/dynamicParams.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | dynamicParams.h 3 | For ESP32 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef dynamicParams_h 14 | #define dynamicParams_h 15 | 16 | // USE_DYNAMIC_PARAMETERS defined in defined.h 17 | 18 | /////////////// Start dynamic Credentials /////////////// 19 | 20 | //Defined in and 21 | /************************************** 22 | #define MAX_ID_LEN 5 23 | #define MAX_DISPLAY_NAME_LEN 16 24 | 25 | typedef struct 26 | { 27 | char id [MAX_ID_LEN + 1]; 28 | char displayName [MAX_DISPLAY_NAME_LEN + 1]; 29 | char *pdata; 30 | uint8_t maxlen; 31 | } MenuItem; 32 | **************************************/ 33 | 34 | #if USE_DYNAMIC_PARAMETERS 35 | 36 | #define MAX_MQTT_SERVER_LEN 34 37 | char MQTT_Server [MAX_MQTT_SERVER_LEN + 1] = "default-mqtt-server"; 38 | 39 | #define MAX_MQTT_PORT_LEN 6 40 | char MQTT_Port [MAX_MQTT_PORT_LEN + 1] = "1883"; 41 | 42 | #define MAX_MQTT_USERNAME_LEN 34 43 | char MQTT_UserName [MAX_MQTT_USERNAME_LEN + 1] = "default-mqtt-username"; 44 | 45 | #define MAX_MQTT_PW_LEN 34 46 | char MQTT_PW [MAX_MQTT_PW_LEN + 1] = "default-mqtt-password"; 47 | 48 | #define MAX_MQTT_SUBS_TOPIC_LEN 34 49 | char MQTT_SubsTopic [MAX_MQTT_SUBS_TOPIC_LEN + 1] = "default-mqtt-SubTopic"; 50 | 51 | #define MAX_MQTT_PUB_TOPIC_LEN 34 52 | char MQTT_PubTopic [MAX_MQTT_PUB_TOPIC_LEN + 1] = "default-mqtt-PubTopic"; 53 | 54 | MenuItem myMenuItems [] = 55 | { 56 | { "mqtt", "MQTT Server", MQTT_Server, MAX_MQTT_SERVER_LEN }, 57 | { "mqpt", "Port", MQTT_Port, MAX_MQTT_PORT_LEN }, 58 | { "user", "MQTT UserName", MQTT_UserName, MAX_MQTT_USERNAME_LEN }, 59 | { "mqpw", "MQTT PWD", MQTT_PW, MAX_MQTT_PW_LEN }, 60 | { "subs", "Subs Topics", MQTT_SubsTopic, MAX_MQTT_SUBS_TOPIC_LEN }, 61 | { "pubs", "Pubs Topics", MQTT_PubTopic, MAX_MQTT_PUB_TOPIC_LEN }, 62 | }; 63 | 64 | uint16_t NUM_MENU_ITEMS = sizeof(myMenuItems) / sizeof(MenuItem); //MenuItemSize; 65 | 66 | #else 67 | 68 | MenuItem myMenuItems [] = {}; 69 | 70 | uint16_t NUM_MENU_ITEMS = 0; 71 | #endif 72 | 73 | 74 | /////// // End dynamic Credentials /////////// 75 | 76 | #endif //dynamicParams_h 77 | -------------------------------------------------------------------------------- /examples/Async_ESP32WM_Config/dynamicParams.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | dynamicParams.h 3 | For ESP32 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef dynamicParams_h 14 | #define dynamicParams_h 15 | 16 | // USE_DYNAMIC_PARAMETERS defined in defined.h 17 | 18 | /////////////// Start dynamic Credentials /////////////// 19 | 20 | //Defined in and 21 | /************************************** 22 | #define MAX_ID_LEN 5 23 | #define MAX_DISPLAY_NAME_LEN 16 24 | 25 | typedef struct 26 | { 27 | char id [MAX_ID_LEN + 1]; 28 | char displayName [MAX_DISPLAY_NAME_LEN + 1]; 29 | char *pdata; 30 | uint8_t maxlen; 31 | } MenuItem; 32 | **************************************/ 33 | 34 | #if USE_DYNAMIC_PARAMETERS 35 | 36 | #define MAX_MQTT_SERVER_LEN 34 37 | char MQTT_Server [MAX_MQTT_SERVER_LEN + 1] = "default-mqtt-server"; 38 | 39 | #define MAX_MQTT_PORT_LEN 6 40 | char MQTT_Port [MAX_MQTT_PORT_LEN + 1] = "1883"; 41 | 42 | #define MAX_MQTT_USERNAME_LEN 34 43 | char MQTT_UserName [MAX_MQTT_USERNAME_LEN + 1] = "default-mqtt-username"; 44 | 45 | #define MAX_MQTT_PW_LEN 34 46 | char MQTT_PW [MAX_MQTT_PW_LEN + 1] = "default-mqtt-password"; 47 | 48 | #define MAX_MQTT_SUBS_TOPIC_LEN 34 49 | char MQTT_SubsTopic [MAX_MQTT_SUBS_TOPIC_LEN + 1] = "default-mqtt-SubTopic"; 50 | 51 | #define MAX_MQTT_PUB_TOPIC_LEN 34 52 | char MQTT_PubTopic [MAX_MQTT_PUB_TOPIC_LEN + 1] = "default-mqtt-PubTopic"; 53 | 54 | MenuItem myMenuItems [] = 55 | { 56 | { "mqtt", "MQTT Server", MQTT_Server, MAX_MQTT_SERVER_LEN }, 57 | { "mqpt", "Port", MQTT_Port, MAX_MQTT_PORT_LEN }, 58 | { "user", "MQTT UserName", MQTT_UserName, MAX_MQTT_USERNAME_LEN }, 59 | { "mqpw", "MQTT PWD", MQTT_PW, MAX_MQTT_PW_LEN }, 60 | { "subs", "Subs Topics", MQTT_SubsTopic, MAX_MQTT_SUBS_TOPIC_LEN }, 61 | { "pubs", "Pubs Topics", MQTT_PubTopic, MAX_MQTT_PUB_TOPIC_LEN }, 62 | }; 63 | 64 | uint16_t NUM_MENU_ITEMS = sizeof(myMenuItems) / sizeof(MenuItem); //MenuItemSize; 65 | 66 | #else 67 | 68 | MenuItem myMenuItems [] = {}; 69 | 70 | uint16_t NUM_MENU_ITEMS = 0; 71 | #endif 72 | 73 | 74 | /////// // End dynamic Credentials /////////// 75 | 76 | #endif //dynamicParams_h 77 | -------------------------------------------------------------------------------- /examples/Async_ESP32WM_MRD_Config/dynamicParams.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | dynamicParams.h 3 | For ESP32 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef dynamicParams_h 14 | #define dynamicParams_h 15 | 16 | // USE_DYNAMIC_PARAMETERS defined in defined.h 17 | 18 | /////////////// Start dynamic Credentials /////////////// 19 | 20 | //Defined in and 21 | /************************************** 22 | #define MAX_ID_LEN 5 23 | #define MAX_DISPLAY_NAME_LEN 16 24 | 25 | typedef struct 26 | { 27 | char id [MAX_ID_LEN + 1]; 28 | char displayName [MAX_DISPLAY_NAME_LEN + 1]; 29 | char *pdata; 30 | uint8_t maxlen; 31 | } MenuItem; 32 | **************************************/ 33 | 34 | #if USE_DYNAMIC_PARAMETERS 35 | 36 | #define MAX_MQTT_SERVER_LEN 34 37 | char MQTT_Server [MAX_MQTT_SERVER_LEN + 1] = "default-mqtt-server"; 38 | 39 | #define MAX_MQTT_PORT_LEN 6 40 | char MQTT_Port [MAX_MQTT_PORT_LEN + 1] = "1883"; 41 | 42 | #define MAX_MQTT_USERNAME_LEN 34 43 | char MQTT_UserName [MAX_MQTT_USERNAME_LEN + 1] = "default-mqtt-username"; 44 | 45 | #define MAX_MQTT_PW_LEN 34 46 | char MQTT_PW [MAX_MQTT_PW_LEN + 1] = "default-mqtt-password"; 47 | 48 | #define MAX_MQTT_SUBS_TOPIC_LEN 34 49 | char MQTT_SubsTopic [MAX_MQTT_SUBS_TOPIC_LEN + 1] = "default-mqtt-SubTopic"; 50 | 51 | #define MAX_MQTT_PUB_TOPIC_LEN 34 52 | char MQTT_PubTopic [MAX_MQTT_PUB_TOPIC_LEN + 1] = "default-mqtt-PubTopic"; 53 | 54 | MenuItem myMenuItems [] = 55 | { 56 | { "mqtt", "MQTT Server", MQTT_Server, MAX_MQTT_SERVER_LEN }, 57 | { "mqpt", "Port", MQTT_Port, MAX_MQTT_PORT_LEN }, 58 | { "user", "MQTT UserName", MQTT_UserName, MAX_MQTT_USERNAME_LEN }, 59 | { "mqpw", "MQTT PWD", MQTT_PW, MAX_MQTT_PW_LEN }, 60 | { "subs", "Subs Topics", MQTT_SubsTopic, MAX_MQTT_SUBS_TOPIC_LEN }, 61 | { "pubs", "Pubs Topics", MQTT_PubTopic, MAX_MQTT_PUB_TOPIC_LEN }, 62 | }; 63 | 64 | uint16_t NUM_MENU_ITEMS = sizeof(myMenuItems) / sizeof(MenuItem); //MenuItemSize; 65 | 66 | #else 67 | 68 | MenuItem myMenuItems [] = {}; 69 | 70 | uint16_t NUM_MENU_ITEMS = 0; 71 | #endif 72 | 73 | 74 | /////// // End dynamic Credentials /////////// 75 | 76 | #endif //dynamicParams_h 77 | -------------------------------------------------------------------------------- /examples/Async_ESP32WM_ForcedConfig/dynamicParams.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | dynamicParams.h 3 | For ESP32 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef dynamicParams_h 14 | #define dynamicParams_h 15 | 16 | // USE_DYNAMIC_PARAMETERS defined in defined.h 17 | 18 | /////////////// Start dynamic Credentials /////////////// 19 | 20 | //Defined in and 21 | /************************************** 22 | #define MAX_ID_LEN 5 23 | #define MAX_DISPLAY_NAME_LEN 16 24 | 25 | typedef struct 26 | { 27 | char id [MAX_ID_LEN + 1]; 28 | char displayName [MAX_DISPLAY_NAME_LEN + 1]; 29 | char *pdata; 30 | uint8_t maxlen; 31 | } MenuItem; 32 | **************************************/ 33 | 34 | #if USE_DYNAMIC_PARAMETERS 35 | 36 | #define MAX_MQTT_SERVER_LEN 34 37 | char MQTT_Server [MAX_MQTT_SERVER_LEN + 1] = "default-mqtt-server"; 38 | 39 | #define MAX_MQTT_PORT_LEN 6 40 | char MQTT_Port [MAX_MQTT_PORT_LEN + 1] = "1883"; 41 | 42 | #define MAX_MQTT_USERNAME_LEN 34 43 | char MQTT_UserName [MAX_MQTT_USERNAME_LEN + 1] = "default-mqtt-username"; 44 | 45 | #define MAX_MQTT_PW_LEN 34 46 | char MQTT_PW [MAX_MQTT_PW_LEN + 1] = "default-mqtt-password"; 47 | 48 | #define MAX_MQTT_SUBS_TOPIC_LEN 34 49 | char MQTT_SubsTopic [MAX_MQTT_SUBS_TOPIC_LEN + 1] = "default-mqtt-SubTopic"; 50 | 51 | #define MAX_MQTT_PUB_TOPIC_LEN 34 52 | char MQTT_PubTopic [MAX_MQTT_PUB_TOPIC_LEN + 1] = "default-mqtt-PubTopic"; 53 | 54 | MenuItem myMenuItems [] = 55 | { 56 | { "mqtt", "MQTT Server", MQTT_Server, MAX_MQTT_SERVER_LEN }, 57 | { "mqpt", "Port", MQTT_Port, MAX_MQTT_PORT_LEN }, 58 | { "user", "MQTT UserName", MQTT_UserName, MAX_MQTT_USERNAME_LEN }, 59 | { "mqpw", "MQTT PWD", MQTT_PW, MAX_MQTT_PW_LEN }, 60 | { "subs", "Subs Topics", MQTT_SubsTopic, MAX_MQTT_SUBS_TOPIC_LEN }, 61 | { "pubs", "Pubs Topics", MQTT_PubTopic, MAX_MQTT_PUB_TOPIC_LEN }, 62 | }; 63 | 64 | uint16_t NUM_MENU_ITEMS = sizeof(myMenuItems) / sizeof(MenuItem); //MenuItemSize; 65 | 66 | #else 67 | 68 | MenuItem myMenuItems [] = {}; 69 | 70 | uint16_t NUM_MENU_ITEMS = 0; 71 | #endif 72 | 73 | 74 | /////// // End dynamic Credentials /////////// 75 | 76 | #endif //dynamicParams_h 77 | -------------------------------------------------------------------------------- /examples/Async_ESP32WM_MRD_ForcedConfig/dynamicParams.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | dynamicParams.h 3 | For ESP32 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef dynamicParams_h 14 | #define dynamicParams_h 15 | 16 | // USE_DYNAMIC_PARAMETERS defined in defined.h 17 | 18 | /////////////// Start dynamic Credentials /////////////// 19 | 20 | //Defined in and 21 | /************************************** 22 | #define MAX_ID_LEN 5 23 | #define MAX_DISPLAY_NAME_LEN 16 24 | 25 | typedef struct 26 | { 27 | char id [MAX_ID_LEN + 1]; 28 | char displayName [MAX_DISPLAY_NAME_LEN + 1]; 29 | char *pdata; 30 | uint8_t maxlen; 31 | } MenuItem; 32 | **************************************/ 33 | 34 | #if USE_DYNAMIC_PARAMETERS 35 | 36 | #define MAX_MQTT_SERVER_LEN 34 37 | char MQTT_Server [MAX_MQTT_SERVER_LEN + 1] = "default-mqtt-server"; 38 | 39 | #define MAX_MQTT_PORT_LEN 6 40 | char MQTT_Port [MAX_MQTT_PORT_LEN + 1] = "1883"; 41 | 42 | #define MAX_MQTT_USERNAME_LEN 34 43 | char MQTT_UserName [MAX_MQTT_USERNAME_LEN + 1] = "default-mqtt-username"; 44 | 45 | #define MAX_MQTT_PW_LEN 34 46 | char MQTT_PW [MAX_MQTT_PW_LEN + 1] = "default-mqtt-password"; 47 | 48 | #define MAX_MQTT_SUBS_TOPIC_LEN 34 49 | char MQTT_SubsTopic [MAX_MQTT_SUBS_TOPIC_LEN + 1] = "default-mqtt-SubTopic"; 50 | 51 | #define MAX_MQTT_PUB_TOPIC_LEN 34 52 | char MQTT_PubTopic [MAX_MQTT_PUB_TOPIC_LEN + 1] = "default-mqtt-PubTopic"; 53 | 54 | MenuItem myMenuItems [] = 55 | { 56 | { "mqtt", "MQTT Server", MQTT_Server, MAX_MQTT_SERVER_LEN }, 57 | { "mqpt", "Port", MQTT_Port, MAX_MQTT_PORT_LEN }, 58 | { "user", "MQTT UserName", MQTT_UserName, MAX_MQTT_USERNAME_LEN }, 59 | { "mqpw", "MQTT PWD", MQTT_PW, MAX_MQTT_PW_LEN }, 60 | { "subs", "Subs Topics", MQTT_SubsTopic, MAX_MQTT_SUBS_TOPIC_LEN }, 61 | { "pubs", "Pubs Topics", MQTT_PubTopic, MAX_MQTT_PUB_TOPIC_LEN }, 62 | }; 63 | 64 | uint16_t NUM_MENU_ITEMS = sizeof(myMenuItems) / sizeof(MenuItem); //MenuItemSize; 65 | 66 | #else 67 | 68 | MenuItem myMenuItems [] = {}; 69 | 70 | uint16_t NUM_MENU_ITEMS = 0; 71 | #endif 72 | 73 | 74 | /////// // End dynamic Credentials /////////// 75 | 76 | #endif //dynamicParams_h 77 | -------------------------------------------------------------------------------- /examples/ESP32_MultiTask/AsyncMT_DHT11ESP32/dynamicParams.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | dynamicParams.h 3 | For ESP32 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef dynamicParams_h 14 | #define dynamicParams_h 15 | 16 | // USE_DYNAMIC_PARAMETERS defined in defined.h 17 | 18 | /////////////// Start dynamic Credentials /////////////// 19 | 20 | //Defined in and 21 | /************************************** 22 | #define MAX_ID_LEN 5 23 | #define MAX_DISPLAY_NAME_LEN 16 24 | 25 | typedef struct 26 | { 27 | char id [MAX_ID_LEN + 1]; 28 | char displayName [MAX_DISPLAY_NAME_LEN + 1]; 29 | char *pdata; 30 | uint8_t maxlen; 31 | } MenuItem; 32 | **************************************/ 33 | 34 | #if USE_DYNAMIC_PARAMETERS 35 | 36 | #define MAX_MQTT_SERVER_LEN 34 37 | char MQTT_Server [MAX_MQTT_SERVER_LEN + 1] = "default-mqtt-server"; 38 | 39 | #define MAX_MQTT_PORT_LEN 6 40 | char MQTT_Port [MAX_MQTT_PORT_LEN + 1] = "1883"; 41 | 42 | #define MAX_MQTT_USERNAME_LEN 34 43 | char MQTT_UserName [MAX_MQTT_USERNAME_LEN + 1] = "default-mqtt-username"; 44 | 45 | #define MAX_MQTT_PW_LEN 34 46 | char MQTT_PW [MAX_MQTT_PW_LEN + 1] = "default-mqtt-password"; 47 | 48 | #define MAX_MQTT_SUBS_TOPIC_LEN 34 49 | char MQTT_SubsTopic [MAX_MQTT_SUBS_TOPIC_LEN + 1] = "default-mqtt-SubTopic"; 50 | 51 | #define MAX_MQTT_PUB_TOPIC_LEN 34 52 | char MQTT_PubTopic [MAX_MQTT_PUB_TOPIC_LEN + 1] = "default-mqtt-PubTopic"; 53 | 54 | MenuItem myMenuItems [] = 55 | { 56 | { "mqtt", "MQTT Server", MQTT_Server, MAX_MQTT_SERVER_LEN }, 57 | { "mqpt", "Port", MQTT_Port, MAX_MQTT_PORT_LEN }, 58 | { "user", "MQTT UserName", MQTT_UserName, MAX_MQTT_USERNAME_LEN }, 59 | { "mqpw", "MQTT PWD", MQTT_PW, MAX_MQTT_PW_LEN }, 60 | { "subs", "Subs Topics", MQTT_SubsTopic, MAX_MQTT_SUBS_TOPIC_LEN }, 61 | { "pubs", "Pubs Topics", MQTT_PubTopic, MAX_MQTT_PUB_TOPIC_LEN }, 62 | }; 63 | 64 | uint16_t NUM_MENU_ITEMS = sizeof(myMenuItems) / sizeof(MenuItem); //MenuItemSize; 65 | 66 | #else 67 | 68 | MenuItem myMenuItems [] = {}; 69 | 70 | uint16_t NUM_MENU_ITEMS = 0; 71 | #endif 72 | 73 | 74 | /////// // End dynamic Credentials /////////// 75 | 76 | #endif //dynamicParams_h 77 | -------------------------------------------------------------------------------- /examples/ESP32_MultiTask/AsyncMT_AM2315_ESP32_SSL/dynamicParams.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | dynamicParams.h 3 | For ESP32 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef dynamicParams_h 14 | #define dynamicParams_h 15 | 16 | // USE_DYNAMIC_PARAMETERS defined in defined.h 17 | 18 | /////////////// Start dynamic Credentials /////////////// 19 | 20 | //Defined in and 21 | /************************************** 22 | #define MAX_ID_LEN 5 23 | #define MAX_DISPLAY_NAME_LEN 16 24 | 25 | typedef struct 26 | { 27 | char id [MAX_ID_LEN + 1]; 28 | char displayName [MAX_DISPLAY_NAME_LEN + 1]; 29 | char *pdata; 30 | uint8_t maxlen; 31 | } MenuItem; 32 | **************************************/ 33 | 34 | #if USE_DYNAMIC_PARAMETERS 35 | 36 | #define MAX_MQTT_SERVER_LEN 34 37 | char MQTT_Server [MAX_MQTT_SERVER_LEN + 1] = "default-mqtt-server"; 38 | 39 | #define MAX_MQTT_PORT_LEN 6 40 | char MQTT_Port [MAX_MQTT_PORT_LEN + 1] = "1883"; 41 | 42 | #define MAX_MQTT_USERNAME_LEN 34 43 | char MQTT_UserName [MAX_MQTT_USERNAME_LEN + 1] = "default-mqtt-username"; 44 | 45 | #define MAX_MQTT_PW_LEN 34 46 | char MQTT_PW [MAX_MQTT_PW_LEN + 1] = "default-mqtt-password"; 47 | 48 | #define MAX_MQTT_SUBS_TOPIC_LEN 34 49 | char MQTT_SubsTopic [MAX_MQTT_SUBS_TOPIC_LEN + 1] = "default-mqtt-SubTopic"; 50 | 51 | #define MAX_MQTT_PUB_TOPIC_LEN 34 52 | char MQTT_PubTopic [MAX_MQTT_PUB_TOPIC_LEN + 1] = "default-mqtt-PubTopic"; 53 | 54 | MenuItem myMenuItems [] = 55 | { 56 | { "mqtt", "MQTT Server", MQTT_Server, MAX_MQTT_SERVER_LEN }, 57 | { "mqpt", "Port", MQTT_Port, MAX_MQTT_PORT_LEN }, 58 | { "user", "MQTT UserName", MQTT_UserName, MAX_MQTT_USERNAME_LEN }, 59 | { "mqpw", "MQTT PWD", MQTT_PW, MAX_MQTT_PW_LEN }, 60 | { "subs", "Subs Topics", MQTT_SubsTopic, MAX_MQTT_SUBS_TOPIC_LEN }, 61 | { "pubs", "Pubs Topics", MQTT_PubTopic, MAX_MQTT_PUB_TOPIC_LEN }, 62 | }; 63 | 64 | uint16_t NUM_MENU_ITEMS = sizeof(myMenuItems) / sizeof(MenuItem); //MenuItemSize; 65 | 66 | #else 67 | 68 | MenuItem myMenuItems [] = {}; 69 | 70 | uint16_t NUM_MENU_ITEMS = 0; 71 | #endif 72 | 73 | 74 | /////// // End dynamic Credentials /////////// 75 | 76 | #endif //dynamicParams_h 77 | -------------------------------------------------------------------------------- /examples/ESP32_MultiTask/AsyncMT_DHT11ESP32_SSL/dynamicParams.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | dynamicParams.h 3 | For ESP32 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef dynamicParams_h 14 | #define dynamicParams_h 15 | 16 | // USE_DYNAMIC_PARAMETERS defined in defined.h 17 | 18 | /////////////// Start dynamic Credentials /////////////// 19 | 20 | //Defined in and 21 | /************************************** 22 | #define MAX_ID_LEN 5 23 | #define MAX_DISPLAY_NAME_LEN 16 24 | 25 | typedef struct 26 | { 27 | char id [MAX_ID_LEN + 1]; 28 | char displayName [MAX_DISPLAY_NAME_LEN + 1]; 29 | char *pdata; 30 | uint8_t maxlen; 31 | } MenuItem; 32 | **************************************/ 33 | 34 | #if USE_DYNAMIC_PARAMETERS 35 | 36 | #define MAX_MQTT_SERVER_LEN 34 37 | char MQTT_Server [MAX_MQTT_SERVER_LEN + 1] = "default-mqtt-server"; 38 | 39 | #define MAX_MQTT_PORT_LEN 6 40 | char MQTT_Port [MAX_MQTT_PORT_LEN + 1] = "1883"; 41 | 42 | #define MAX_MQTT_USERNAME_LEN 34 43 | char MQTT_UserName [MAX_MQTT_USERNAME_LEN + 1] = "default-mqtt-username"; 44 | 45 | #define MAX_MQTT_PW_LEN 34 46 | char MQTT_PW [MAX_MQTT_PW_LEN + 1] = "default-mqtt-password"; 47 | 48 | #define MAX_MQTT_SUBS_TOPIC_LEN 34 49 | char MQTT_SubsTopic [MAX_MQTT_SUBS_TOPIC_LEN + 1] = "default-mqtt-SubTopic"; 50 | 51 | #define MAX_MQTT_PUB_TOPIC_LEN 34 52 | char MQTT_PubTopic [MAX_MQTT_PUB_TOPIC_LEN + 1] = "default-mqtt-PubTopic"; 53 | 54 | MenuItem myMenuItems [] = 55 | { 56 | { "mqtt", "MQTT Server", MQTT_Server, MAX_MQTT_SERVER_LEN }, 57 | { "mqpt", "Port", MQTT_Port, MAX_MQTT_PORT_LEN }, 58 | { "user", "MQTT UserName", MQTT_UserName, MAX_MQTT_USERNAME_LEN }, 59 | { "mqpw", "MQTT PWD", MQTT_PW, MAX_MQTT_PW_LEN }, 60 | { "subs", "Subs Topics", MQTT_SubsTopic, MAX_MQTT_SUBS_TOPIC_LEN }, 61 | { "pubs", "Pubs Topics", MQTT_PubTopic, MAX_MQTT_PUB_TOPIC_LEN }, 62 | }; 63 | 64 | uint16_t NUM_MENU_ITEMS = sizeof(myMenuItems) / sizeof(MenuItem); //MenuItemSize; 65 | 66 | #else 67 | 68 | MenuItem myMenuItems [] = {}; 69 | 70 | uint16_t NUM_MENU_ITEMS = 0; 71 | #endif 72 | 73 | 74 | /////// // End dynamic Credentials /////////// 75 | 76 | #endif //dynamicParams_h 77 | -------------------------------------------------------------------------------- /examples/ESP32_MultiTask/AsyncMT_ESP32WM_Config/dynamicParams.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | dynamicParams.h 3 | For ESP32 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef dynamicParams_h 14 | #define dynamicParams_h 15 | 16 | // USE_DYNAMIC_PARAMETERS defined in defined.h 17 | 18 | /////////////// Start dynamic Credentials /////////////// 19 | 20 | //Defined in and 21 | /************************************** 22 | #define MAX_ID_LEN 5 23 | #define MAX_DISPLAY_NAME_LEN 16 24 | 25 | typedef struct 26 | { 27 | char id [MAX_ID_LEN + 1]; 28 | char displayName [MAX_DISPLAY_NAME_LEN + 1]; 29 | char *pdata; 30 | uint8_t maxlen; 31 | } MenuItem; 32 | **************************************/ 33 | 34 | #if USE_DYNAMIC_PARAMETERS 35 | 36 | #define MAX_MQTT_SERVER_LEN 34 37 | char MQTT_Server [MAX_MQTT_SERVER_LEN + 1] = "default-mqtt-server"; 38 | 39 | #define MAX_MQTT_PORT_LEN 6 40 | char MQTT_Port [MAX_MQTT_PORT_LEN + 1] = "1883"; 41 | 42 | #define MAX_MQTT_USERNAME_LEN 34 43 | char MQTT_UserName [MAX_MQTT_USERNAME_LEN + 1] = "default-mqtt-username"; 44 | 45 | #define MAX_MQTT_PW_LEN 34 46 | char MQTT_PW [MAX_MQTT_PW_LEN + 1] = "default-mqtt-password"; 47 | 48 | #define MAX_MQTT_SUBS_TOPIC_LEN 34 49 | char MQTT_SubsTopic [MAX_MQTT_SUBS_TOPIC_LEN + 1] = "default-mqtt-SubTopic"; 50 | 51 | #define MAX_MQTT_PUB_TOPIC_LEN 34 52 | char MQTT_PubTopic [MAX_MQTT_PUB_TOPIC_LEN + 1] = "default-mqtt-PubTopic"; 53 | 54 | MenuItem myMenuItems [] = 55 | { 56 | { "mqtt", "MQTT Server", MQTT_Server, MAX_MQTT_SERVER_LEN }, 57 | { "mqpt", "Port", MQTT_Port, MAX_MQTT_PORT_LEN }, 58 | { "user", "MQTT UserName", MQTT_UserName, MAX_MQTT_USERNAME_LEN }, 59 | { "mqpw", "MQTT PWD", MQTT_PW, MAX_MQTT_PW_LEN }, 60 | { "subs", "Subs Topics", MQTT_SubsTopic, MAX_MQTT_SUBS_TOPIC_LEN }, 61 | { "pubs", "Pubs Topics", MQTT_PubTopic, MAX_MQTT_PUB_TOPIC_LEN }, 62 | }; 63 | 64 | uint16_t NUM_MENU_ITEMS = sizeof(myMenuItems) / sizeof(MenuItem); //MenuItemSize; 65 | 66 | #else 67 | 68 | MenuItem myMenuItems [] = {}; 69 | 70 | uint16_t NUM_MENU_ITEMS = 0; 71 | #endif 72 | 73 | 74 | /////// // End dynamic Credentials /////////// 75 | 76 | #endif //dynamicParams_h 77 | -------------------------------------------------------------------------------- /examples/ESP32_MultiTask/Async_ESP32_MultiTask/dynamicParams.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | dynamicParams.h 3 | For ESP32 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef dynamicParams_h 14 | #define dynamicParams_h 15 | 16 | // USE_DYNAMIC_PARAMETERS defined in defined.h 17 | 18 | /////////////// Start dynamic Credentials /////////////// 19 | 20 | //Defined in and 21 | /************************************** 22 | #define MAX_ID_LEN 5 23 | #define MAX_DISPLAY_NAME_LEN 16 24 | 25 | typedef struct 26 | { 27 | char id [MAX_ID_LEN + 1]; 28 | char displayName [MAX_DISPLAY_NAME_LEN + 1]; 29 | char *pdata; 30 | uint8_t maxlen; 31 | } MenuItem; 32 | **************************************/ 33 | 34 | #if USE_DYNAMIC_PARAMETERS 35 | 36 | #define MAX_MQTT_SERVER_LEN 34 37 | char MQTT_Server [MAX_MQTT_SERVER_LEN + 1] = "default-mqtt-server"; 38 | 39 | #define MAX_MQTT_PORT_LEN 6 40 | char MQTT_Port [MAX_MQTT_PORT_LEN + 1] = "1883"; 41 | 42 | #define MAX_MQTT_USERNAME_LEN 34 43 | char MQTT_UserName [MAX_MQTT_USERNAME_LEN + 1] = "default-mqtt-username"; 44 | 45 | #define MAX_MQTT_PW_LEN 34 46 | char MQTT_PW [MAX_MQTT_PW_LEN + 1] = "default-mqtt-password"; 47 | 48 | #define MAX_MQTT_SUBS_TOPIC_LEN 34 49 | char MQTT_SubsTopic [MAX_MQTT_SUBS_TOPIC_LEN + 1] = "default-mqtt-SubTopic"; 50 | 51 | #define MAX_MQTT_PUB_TOPIC_LEN 34 52 | char MQTT_PubTopic [MAX_MQTT_PUB_TOPIC_LEN + 1] = "default-mqtt-PubTopic"; 53 | 54 | MenuItem myMenuItems [] = 55 | { 56 | { "mqtt", "MQTT Server", MQTT_Server, MAX_MQTT_SERVER_LEN }, 57 | { "mqpt", "Port", MQTT_Port, MAX_MQTT_PORT_LEN }, 58 | { "user", "MQTT UserName", MQTT_UserName, MAX_MQTT_USERNAME_LEN }, 59 | { "mqpw", "MQTT PWD", MQTT_PW, MAX_MQTT_PW_LEN }, 60 | { "subs", "Subs Topics", MQTT_SubsTopic, MAX_MQTT_SUBS_TOPIC_LEN }, 61 | { "pubs", "Pubs Topics", MQTT_PubTopic, MAX_MQTT_PUB_TOPIC_LEN }, 62 | }; 63 | 64 | uint16_t NUM_MENU_ITEMS = sizeof(myMenuItems) / sizeof(MenuItem); //MenuItemSize; 65 | 66 | #else 67 | 68 | MenuItem myMenuItems [] = {}; 69 | 70 | uint16_t NUM_MENU_ITEMS = 0; 71 | #endif 72 | 73 | 74 | /////// // End dynamic Credentials /////////// 75 | 76 | #endif //dynamicParams_h 77 | -------------------------------------------------------------------------------- /examples/ESP32_MultiTask/AsyncMT_ESP32WM_ForcedConfig/dynamicParams.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | dynamicParams.h 3 | For ESP32 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef dynamicParams_h 14 | #define dynamicParams_h 15 | 16 | // USE_DYNAMIC_PARAMETERS defined in defined.h 17 | 18 | /////////////// Start dynamic Credentials /////////////// 19 | 20 | //Defined in and 21 | /************************************** 22 | #define MAX_ID_LEN 5 23 | #define MAX_DISPLAY_NAME_LEN 16 24 | 25 | typedef struct 26 | { 27 | char id [MAX_ID_LEN + 1]; 28 | char displayName [MAX_DISPLAY_NAME_LEN + 1]; 29 | char *pdata; 30 | uint8_t maxlen; 31 | } MenuItem; 32 | **************************************/ 33 | 34 | #if USE_DYNAMIC_PARAMETERS 35 | 36 | #define MAX_MQTT_SERVER_LEN 34 37 | char MQTT_Server [MAX_MQTT_SERVER_LEN + 1] = "default-mqtt-server"; 38 | 39 | #define MAX_MQTT_PORT_LEN 6 40 | char MQTT_Port [MAX_MQTT_PORT_LEN + 1] = "1883"; 41 | 42 | #define MAX_MQTT_USERNAME_LEN 34 43 | char MQTT_UserName [MAX_MQTT_USERNAME_LEN + 1] = "default-mqtt-username"; 44 | 45 | #define MAX_MQTT_PW_LEN 34 46 | char MQTT_PW [MAX_MQTT_PW_LEN + 1] = "default-mqtt-password"; 47 | 48 | #define MAX_MQTT_SUBS_TOPIC_LEN 34 49 | char MQTT_SubsTopic [MAX_MQTT_SUBS_TOPIC_LEN + 1] = "default-mqtt-SubTopic"; 50 | 51 | #define MAX_MQTT_PUB_TOPIC_LEN 34 52 | char MQTT_PubTopic [MAX_MQTT_PUB_TOPIC_LEN + 1] = "default-mqtt-PubTopic"; 53 | 54 | MenuItem myMenuItems [] = 55 | { 56 | { "mqtt", "MQTT Server", MQTT_Server, MAX_MQTT_SERVER_LEN }, 57 | { "mqpt", "Port", MQTT_Port, MAX_MQTT_PORT_LEN }, 58 | { "user", "MQTT UserName", MQTT_UserName, MAX_MQTT_USERNAME_LEN }, 59 | { "mqpw", "MQTT PWD", MQTT_PW, MAX_MQTT_PW_LEN }, 60 | { "subs", "Subs Topics", MQTT_SubsTopic, MAX_MQTT_SUBS_TOPIC_LEN }, 61 | { "pubs", "Pubs Topics", MQTT_PubTopic, MAX_MQTT_PUB_TOPIC_LEN }, 62 | }; 63 | 64 | uint16_t NUM_MENU_ITEMS = sizeof(myMenuItems) / sizeof(MenuItem); //MenuItemSize; 65 | 66 | #else 67 | 68 | MenuItem myMenuItems [] = {}; 69 | 70 | uint16_t NUM_MENU_ITEMS = 0; 71 | #endif 72 | 73 | 74 | /////// // End dynamic Credentials /////////// 75 | 76 | #endif //dynamicParams_h 77 | -------------------------------------------------------------------------------- /library.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Blynk_Async_WM", 3 | "version": "1.6.2", 4 | "description": "Library, using AsyncWebServer instead of (ESP8266)WebServer, for configuring/auto(re)connecting ESP32 (including ESP32-S2 and ESP32-C3), ESP8266 modules to best or available MultiWiFi APs and MultiBlynk servers at runtime. Enable adding dynamic custom parameters from sketch and input using the same Config Portal (CP). CP will be auto-adjusted to match the number of dynamic parameters. Optional default Credentials to be autoloaded into CP to use or change instead of manually input. Static STA IP and DHCP Hostname as well as Config Portal AP channel, IP, SSID, Password can be configured. Config. Data saved in ESP8266/ESP32 LittleFS, SPIFFS or EEPROM. Multi, Double DetectDetector or Virtual CP Switch feature permits entering CP as requested. Configurable Customs HTML Headers, including Customs Style, Customs Head Elements, CORS Header. Now with scanning of WiFi networks for selection in Configuration Portal and working with new ESP8266 core v3.0.1 and ESP32 core v1.0.6", 5 | "keywords": "control, device, communication, blynk, iot, wifi, esp8266, esp32, esp32-s2, esp32-c3, async, drd, mrd, double-reset, multi-reset, config-portal, credentials, dynamic-params, customs-header, smartphone, mobile, app, web, cloud, sensors, m2m, protocol, ble, bluetooth, Manager, DynamicParameters, dynamic, configportal, usb, serial, ethernet, data, http, portal ", 6 | "authors": 7 | { 8 | "name": "Khoi Hoang", 9 | "url": "https://github.com/khoih-prog", 10 | "maintainer": true 11 | }, 12 | "repository": 13 | { 14 | "type": "git", 15 | "url": "https://github.com/khoih-prog/Blynk_Async_WM" 16 | }, 17 | "homepage": "http://blynk.cc", 18 | "export": { 19 | "exclude": [ 20 | "linux", 21 | "extras", 22 | "tests" 23 | ] 24 | }, 25 | "dependencies": 26 | [ 27 | { 28 | "owner": "blynkkk", 29 | "name": "Blynk", 30 | "version": "^1.0.1", 31 | "platforms": ["espressif8266", "espressif32"] 32 | }, 33 | { 34 | "owner": "khoih-prog", 35 | "name": "ESP_DoubleResetDetector", 36 | "version": "^1.2.1", 37 | "platforms": ["espressif8266", "espressif32"] 38 | }, 39 | { 40 | "owner": "khoih-prog", 41 | "name": "ESP_MultiResetDetector", 42 | "version": "^1.2.1", 43 | "platforms": ["espressif8266", "espressif32"] 44 | }, 45 | { 46 | "owner": "me-no-dev", 47 | "name": "AsyncTCP", 48 | "version": "^1.1.1", 49 | "platforms": ["espressif32"] 50 | }, 51 | { 52 | "owner": "me-no-dev", 53 | "name": "ESPAsyncTCP", 54 | "version": "^1.2.2", 55 | "platforms": "espressif8266" 56 | }, 57 | { 58 | "owner": "me-no-dev", 59 | "name": "ESP Async WebServer", 60 | "version": "^1.2.3", 61 | "platforms": ["espressif8266", "espressif32"] 62 | }, 63 | { 64 | "owner": "lorol", 65 | "name": "LittleFS_esp32", 66 | "version": ">=1.0.6", 67 | "platforms": ["espressif32"] 68 | } 69 | ], 70 | "frameworks": "*", 71 | "platforms": "*", 72 | "examples": "examples/*/*/*.ino" 73 | } 74 | -------------------------------------------------------------------------------- /examples/Async_Blynk_WM_Template/README.md: -------------------------------------------------------------------------------- 1 | # Blynk WiFi & Color Templates and Helper Examples 2 | 3 | ## Blynk_WiFiManager template and Color selector example 4 | Updated 27 June 2020 to Blynk_WiFiManager (WM) library update 1.0.16 5 | 6 | The Arduino/Blynk sketch **Blynk_WM_Template.ino** is a fully-developed get-started demo program for the powerful BlynkSimpleESP... and the newer WiFiManager (WM) libraries.**It is also a Blynk HEX color selector.** 7 | 8 | It demonstrates 9 | * **WiFiManager Config Portal** configuration and use 10 | * **WiFiManager Dynamic (extended) Parameters** configuration and use 11 | * **LittleFS file system for ESP8266** is an option along with EEPROM and the soon-to-be deprecated SPIFFS 12 | * Use of **compiler constants** for compile-time selection 13 | * Use of Blynk's **BLYNK_WRITE_DEFAULT()** flexible capability 14 | 15 | This sketch lets end-users choose a color using ZeRGBa, colors a blinking (heartbeat) LED, and shows the HEX code for that color. 16 | 17 | It requires: 18 | * Blynk ZeRGBa configured in MERGE mode with values between 0 and 255 19 | * Blynk LED 20 | * Blynk Value Display 21 | * Blynk master library installed 22 | * Blynk_WiFiManager library installed 23 | * ESP32 or ESP8266 devices 24 | 25 | As in all Blynk sketches using WiFi, you will need 26 | * Your WiFi SSID or SSIDs and passwords 27 | * Your Blynk authcode or authcodes 28 | * Your Blynk server URL (Main US Blynk server is blynk-cloud.com.) 29 | 30 | These values do not need to be coded into the sketch as they may be entered at runtime (once) into the Config Portal. 31 | 32 | You also do not have to hardcode the Virtual Pins for the ZeRGBa, LED or Value Display, can input them at runtime using the Config Portal. 33 | This sketch uses Blynk's BLYNK_WRITE_DEFAULT() capability to deliver this flexibility. I use this approach to manage a number of similar wireless controls like SONOFFs with the same sketch. 34 | 35 | The Config Portal will appear as SSID MyConfigPortal, with WiFi password of 12345678 and IP address of 192.168.220.1. 36 | These three values (Config Portal SSID, password, IP address) are hardcoded into the sketch (but could be made selectable in the Config Portal, itself.) 37 | 38 | I hope this is as useful to you as it has been to me to understand Blynk, the BlynkSimpleESP... and ...WiFiManager libraries, the ESP32 and ESP8266. https://github.com/thorathome/Blynk_Examples 39 | 40 | **Thanks to @khoih-prog (@khoih on Blynk Community) for updating this example to include LittleFS and for writing the powerful WiFiManager library** 41 | 42 | 43 | ## MY_BLYNK_COLORS.h 44 | I've seen on Blynk many questions and confusions about HEX color codes. Here is a small set of helpful colors I often use. I'll expand these as I create more. 45 | 46 | To use easily (**Thanks to Andreas Spiess on YouTube for this hint!**) 47 | * Create a folder called MY_BLYNK_COLORS inside your libraries folder . 48 | * Download MY_BLYNK_COLORS.h into the MY_BLYNK_COLORS folder. 49 | * Use **#include "MY_BLYNK_COLORS.h"** in your sketch to get these color samples easily. 50 | 51 | 52 | ## ESP_LED_BUILTINS.h 53 | When I found out that the Arduino ESP8266 libraries have the LED_BUILTIN inverted (HIGH is LOW and LOW is HIGH - ugh.) 54 | I built this little code snippet. 55 | 56 | So place this file in your Arduino/libraries folder and put **#include "ESP_LED_BUILTINS.h"** in your sketch. 57 | Use LED_BUILTIN_HIGH for HIGH and LED_BUILTIN_LOW for LOW and it will work with either ESP platform. 58 | 59 | Also, I found that some ESP32s do not have a LED-BUILTIN defined in the Arduino board library. LED_BUILTIN is 13 for ESP32. 60 | 61 | -------------------------------------------------------------------------------- /platformio/platformio.ini: -------------------------------------------------------------------------------- 1 | ;PlatformIO Project Configuration File 2 | ; 3 | ; Build options: build flags, source filter 4 | ; Upload options: custom upload port, speed and extra flags 5 | ; Library options: dependencies, extra library storages 6 | ; Advanced options: extra scripting 7 | ; 8 | ; Please visit documentation for the other options and examples 9 | ; https://docs.platformio.org/page/projectconf.html 10 | 11 | [platformio] 12 | ; ============================================================ 13 | ; chose environment: 14 | ; ESP8266 15 | ; ESP32 16 | ; ============================================================ 17 | default_envs = ESP8266 18 | ;default_envs = ESP32 19 | 20 | [env] 21 | ; ============================================================ 22 | ; Serial configuration 23 | ; choose upload speed, serial-monitor speed 24 | ; ============================================================ 25 | upload_speed = 921600 26 | ;upload_port = COM11 27 | ;monitor_speed = 9600 28 | ;monitor_port = COM11 29 | 30 | ; Checks for the compatibility with frameworks and dev/platforms 31 | lib_compat_mode = strict 32 | 33 | lib_deps = 34 | ; PlatformIO 4.x 35 | Blynk@~0.6.1 36 | ESP_DoubleResetDetector@~1.1.1 37 | ESP_MultiResetDetector@~1.1.1 38 | ESP Async WebServer@~1.2.3 39 | ESPAsyncTCP@~1.2.2 40 | AsyncTCP@~1.1.1 41 | LittleFS_esp32@>=1.0.6 42 | ; PlatformIO 5.x 43 | ; blynkkk/Blynk@~0.6.1 44 | ; khoih-prog/ESP_DoubleResetDetector@~1.1.1 45 | ; khoih-prog/ESP_MultiResetDetector@~1.1.1 46 | ; me-no-dev/ESP Async WebServer@~1.2.3 47 | ; me-no-dev/ESPAsyncTCP@~1.2.2 48 | ; me-no-dev/AsyncTCP@~1.1.1 49 | ; lorol/LittleFS_esp32@>=1.0.6 50 | 51 | build_flags = 52 | ; set your debug output (default=Serial) 53 | -D DEBUG_ESP_PORT=Serial 54 | ; comment the folowing line to enable WiFi debugging 55 | -D NDEBUG 56 | 57 | [env:ESP8266] 58 | platform = espressif8266 59 | framework = arduino 60 | ; ============================================================ 61 | ; Board configuration 62 | ; choose your board by uncommenting one of the following lines 63 | ; ============================================================ 64 | ;board = gen4iod 65 | ;board = huzzah 66 | ;board = oak 67 | ;board = esp_wroom_02 68 | ;board = espduino 69 | ;board = espectro 70 | ;board = espino 71 | ;board = espresso_lite_v1 72 | ;board = espresso_lite_v2 73 | ;board = esp12e 74 | ;board = esp01_1m 75 | ;board = esp01 76 | ;board = esp07 77 | ;board = esp8285 78 | ;board = heltec_wifi_kit_8 79 | ;board = inventone 80 | ;board = nodemcu 81 | board = nodemcuv2 82 | ;board = modwifi 83 | ;board = phoenix_v1 84 | ;board = phoenix_v2 85 | ;board = sparkfunBlynk 86 | ;board = thing 87 | ;board = thingdev 88 | ;board = esp210 89 | ;board = espinotee 90 | ;board = d1 91 | ;board = d1_mini 92 | ;board = d1_mini_lite 93 | ;board = d1_mini_pro 94 | ;board = wifi_slot 95 | ;board = wifiduino 96 | ;board = wifinfo 97 | ;board = wio_link 98 | ;board = wio_node 99 | ;board = xinabox_cw01 100 | ;board = esp32doit-devkit-v1 101 | 102 | [env:ESP32] 103 | platform = espressif32 104 | framework = arduino, espidf 105 | ; ============================================================ 106 | ; Board configuration 107 | ; choose your board by uncommenting one of the following lines 108 | ; ============================================================ 109 | ;board = esp32cam 110 | ;board = alksesp32 111 | ;board = featheresp32 112 | ;board = espea32 113 | ;board = bpi-bit 114 | ;board = d-duino-32 115 | board = esp32doit-devkit-v1 116 | ;board = pocket_32 117 | ;board = fm-devkit 118 | ;board = pico32 119 | ;board = esp32-evb 120 | ;board = esp32-gateway 121 | ;board = esp32-pro 122 | ;board = esp32-poe 123 | ;board = oroca_edubot 124 | ;board = onehorse32dev 125 | ;board = lopy 126 | ;board = lopy4 127 | ;board = wesp32 128 | ;board = esp32thing 129 | ;board = sparkfun_lora_gateway_1-channel 130 | ;board = ttgo-lora32-v1 131 | ;board = ttgo-t-beam 132 | ;board = turta_iot_node 133 | ;board = lolin_d32 134 | ;board = lolin_d32_pro 135 | ;board = lolin32 136 | ;board = wemosbat 137 | ;board = widora-air 138 | ;board = xinabox_cw02 139 | ;board = iotbusio 140 | ;board = iotbusproteus 141 | ;board = nina_w10 142 | -------------------------------------------------------------------------------- /examples/Async_ESP8266WM_ForcedConfig/defines.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | defines.h 3 | For ESP8266 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef defines_h 14 | #define defines_h 15 | 16 | #ifndef ESP8266 17 | #error This code is intended to run on the ESP8266 platform! Please check your Tools->Board setting. 18 | #endif 19 | 20 | #define BLYNK_PRINT Serial 21 | 22 | #define DOUBLERESETDETECTOR_DEBUG false 23 | #define BLYNK_WM_DEBUG 0 24 | 25 | // #define USE_SPIFFS and USE_LITTLEFS false => using EEPROM for configuration data in WiFiManager 26 | // #define USE_LITTLEFS true => using LITTLEFS for configuration data in WiFiManager 27 | // #define USE_LITTLEFS false and USE_SPIFFS true => using SPIFFS for configuration data in WiFiManager 28 | // Be sure to define USE_LITTLEFS and USE_SPIFFS before #include 29 | // From ESP8266 core 2.7.1, SPIFFS will be deprecated and to be replaced by LittleFS 30 | // Select USE_LITTLEFS (higher priority) or USE_SPIFFS 31 | 32 | #define USE_LITTLEFS true 33 | #define USE_SPIFFS false 34 | 35 | #if USE_LITTLEFS 36 | //LittleFS has higher priority 37 | #define CurrentFileFS "LittleFS" 38 | #ifdef USE_SPIFFS 39 | #undef USE_SPIFFS 40 | #endif 41 | #define USE_SPIFFS false 42 | #elif USE_SPIFFS 43 | #define CurrentFileFS "SPIFFS" 44 | #endif 45 | 46 | 47 | #if !( USE_LITTLEFS || USE_SPIFFS) 48 | // EEPROM_SIZE must be <= 4096 and >= CONFIG_DATA_SIZE (currently 172 bytes) 49 | #define EEPROM_SIZE (4 * 1024) 50 | // EEPROM_START + CONFIG_DATA_SIZE must be <= EEPROM_SIZE 51 | #define EEPROM_START 0 52 | #endif 53 | 54 | ///////////////////////////////////////////// 55 | 56 | // Add customs headers from v1.2.0 57 | #define USING_CUSTOMS_STYLE true 58 | #define USING_CUSTOMS_HEAD_ELEMENT true 59 | #define USING_CORS_FEATURE true 60 | 61 | ///////////////////////////////////////////// 62 | 63 | // Force some params in Blynk, only valid for library version 1.0.1 and later 64 | #define TIMEOUT_RECONNECT_WIFI 10000L 65 | #define RESET_IF_CONFIG_TIMEOUT true 66 | 67 | #define CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET 5 68 | 69 | // Config Timeout 120s (default 60s) 70 | #define CONFIG_TIMEOUT 120000L 71 | 72 | #define USE_DYNAMIC_PARAMETERS true 73 | 74 | ///////////////////////////////////////////// 75 | 76 | #define REQUIRE_ONE_SET_SSID_PW false 77 | 78 | #define SCAN_WIFI_NETWORKS true 79 | 80 | // To be able to manually input SSID, not from a scanned SSID lists 81 | #define MANUAL_SSID_INPUT_ALLOWED true 82 | 83 | // From 2-15 84 | #define MAX_SSID_IN_LIST 8 85 | 86 | ///////////////////////////////////////////// 87 | 88 | ////////////////////////////////////////// 89 | // Those above #define's must be placed before #include 90 | 91 | //#define USE_SSL true 92 | #define USE_SSL false 93 | 94 | #if USE_SSL 95 | #include //https://github.com/khoih-prog/Blynk_Async_WM 96 | #else 97 | #include //https://github.com/khoih-prog/Blynk_Async_WM 98 | #endif 99 | 100 | #define PIN_LED 2 // Pin D4 mapped to pin GPIO2/TXD1 of ESP8266, NodeMCU and WeMoS, control on-board LED 101 | #define PIN_D2 4 // Pin D2 mapped to pin GPIO4 of ESP8266 102 | 103 | #define DHT_PIN PIN_D2 104 | #define DHT_TYPE DHT11 105 | 106 | #define HOST_NAME "ESP8266-Async-Config" 107 | 108 | #endif //defines_h 109 | -------------------------------------------------------------------------------- /examples/Async_ESP8266WM_Config/defines.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | defines.h 3 | For ESP8266 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef defines_h 14 | #define defines_h 15 | 16 | #ifndef ESP8266 17 | #error This code is intended to run on the ESP8266 platform! Please check your Tools->Board setting. 18 | #endif 19 | 20 | #define BLYNK_PRINT Serial 21 | 22 | #define DOUBLERESETDETECTOR_DEBUG false 23 | #define BLYNK_WM_DEBUG 0 24 | 25 | // #define USE_SPIFFS and USE_LITTLEFS false => using EEPROM for configuration data in WiFiManager 26 | // #define USE_LITTLEFS true => using LITTLEFS for configuration data in WiFiManager 27 | // #define USE_LITTLEFS false and USE_SPIFFS true => using SPIFFS for configuration data in WiFiManager 28 | // Be sure to define USE_LITTLEFS and USE_SPIFFS before #include 29 | // From ESP8266 core 2.7.1, SPIFFS will be deprecated and to be replaced by LittleFS 30 | // Select USE_LITTLEFS (higher priority) or USE_SPIFFS 31 | 32 | #define USE_LITTLEFS true 33 | //#define USE_LITTLEFS false 34 | #define USE_SPIFFS false 35 | //#define USE_SPIFFS true 36 | 37 | #if USE_LITTLEFS 38 | //LittleFS has higher priority 39 | #define CurrentFileFS "LittleFS" 40 | #ifdef USE_SPIFFS 41 | #undef USE_SPIFFS 42 | #endif 43 | #define USE_SPIFFS false 44 | #elif USE_SPIFFS 45 | #define CurrentFileFS "SPIFFS" 46 | #endif 47 | 48 | 49 | #if !( USE_LITTLEFS || USE_SPIFFS) 50 | // EEPROM_SIZE must be <= 4096 and >= CONFIG_DATA_SIZE (currently 172 bytes) 51 | #define EEPROM_SIZE (4 * 1024) 52 | // EEPROM_START + CONFIG_DATA_SIZE must be <= EEPROM_SIZE 53 | #define EEPROM_START 0 54 | #endif 55 | 56 | ///////////////////////////////////////////// 57 | 58 | // Add customs headers from v1.2.0 59 | #define USING_CUSTOMS_STYLE true 60 | #define USING_CUSTOMS_HEAD_ELEMENT true 61 | #define USING_CORS_FEATURE true 62 | 63 | ///////////////////////////////////////////// 64 | 65 | // Force some params in Blynk, only valid for library version 1.0.1 and later 66 | #define TIMEOUT_RECONNECT_WIFI 10000L 67 | #define RESET_IF_CONFIG_TIMEOUT true 68 | 69 | #define CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET 5 70 | 71 | // Config Timeout 120s (default 60s) 72 | #define CONFIG_TIMEOUT 120000L 73 | 74 | #define USE_DYNAMIC_PARAMETERS true 75 | 76 | ///////////////////////////////////////////// 77 | 78 | #define REQUIRE_ONE_SET_SSID_PW false 79 | 80 | #define SCAN_WIFI_NETWORKS true 81 | 82 | // To be able to manually input SSID, not from a scanned SSID lists 83 | #define MANUAL_SSID_INPUT_ALLOWED true 84 | 85 | // From 2-15 86 | #define MAX_SSID_IN_LIST 8 87 | 88 | ///////////////////////////////////////////// 89 | 90 | ////////////////////////////////////////// 91 | // Those above #define's must be placed before #include 92 | 93 | #define USE_SSL true 94 | //#define USE_SSL false 95 | 96 | #if USE_SSL 97 | #include //https://github.com/khoih-prog/Blynk_Async_WM 98 | #else 99 | #include //https://github.com/khoih-prog/Blynk_Async_WM 100 | #endif 101 | 102 | #define PIN_LED 2 // Pin D4 mapped to pin GPIO2/TXD1 of ESP8266, NodeMCU and WeMoS, control on-board LED 103 | #define PIN_D2 4 // Pin D2 mapped to pin GPIO4 of ESP8266 104 | 105 | #define DHT_PIN PIN_D2 106 | #define DHT_TYPE DHT11 107 | 108 | #define HOST_NAME "ESP8266-Async-Config" 109 | 110 | #endif //defines_h 111 | -------------------------------------------------------------------------------- /examples/ESP32_MultiTask/Async_ESP32_MultiTask/defines.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | defines.h 3 | For ESP32 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef defines_h 14 | #define defines_h 15 | 16 | #if !( defined(ESP32) ) 17 | #error This code is intended to run on the ESP32 platform! Please check your Tools->Board setting. 18 | #elif ( ARDUINO_ESP32S2_DEV || ARDUINO_FEATHERS2 || ARDUINO_ESP32S2_THING_PLUS || ARDUINO_MICROS2 || \ 19 | ARDUINO_METRO_ESP32S2 || ARDUINO_MAGTAG29_ESP32S2 || ARDUINO_FUNHOUSE_ESP32S2 || \ 20 | ARDUINO_ADAFRUIT_FEATHER_ESP32S2_NOPSRAM ) 21 | #error This code is not supporting ESP32-S2 now. 22 | #define BOARD_TYPE "ESP32-S2" 23 | #elif ( ARDUINO_ESP32C3_DEV ) 24 | #error This code is not supporting ESP32-C3 now. 25 | #define BOARD_TYPE "ESP32-C3" 26 | #else 27 | #define BOARD_TYPE "ESP32" 28 | #endif 29 | 30 | #define BLYNK_PRINT Serial 31 | 32 | #define DOUBLERESETDETECTOR_DEBUG false 33 | #define BLYNK_WM_DEBUG 3 34 | 35 | #define BLYNK_WM_RTOS_DEBUG 1 36 | 37 | // Not use #define USE_LITTLEFS and #define USE_SPIFFS => using SPIFFS for configuration data in WiFiManager 38 | // (USE_LITTLEFS == false) and (USE_SPIFFS == false) => using EEPROM for configuration data in WiFiManager 39 | // (USE_LITTLEFS == true) and (USE_SPIFFS == false) => using LITTLEFS for configuration data in WiFiManager 40 | // (USE_LITTLEFS == true) and (USE_SPIFFS == true) => using LITTLEFS for configuration data in WiFiManager 41 | // (USE_LITTLEFS == false) and (USE_SPIFFS == true) => using SPIFFS for configuration data in WiFiManager 42 | // Those above #define's must be placed before #include 43 | 44 | #if ( ARDUINO_ESP32C3_DEV ) 45 | // Currently, ESP32-C3 only supporting SPIFFS and EEPROM. Will fix to support LittleFS 46 | #define USE_LITTLEFS false 47 | #define USE_SPIFFS true 48 | #else 49 | #define USE_LITTLEFS true 50 | #define USE_SPIFFS false 51 | #endif 52 | 53 | #if USE_LITTLEFS 54 | //LittleFS has higher priority 55 | #define CurrentFileFS "LittleFS" 56 | #ifdef USE_SPIFFS 57 | #undef USE_SPIFFS 58 | #endif 59 | #define USE_SPIFFS false 60 | #elif USE_SPIFFS 61 | #define CurrentFileFS "SPIFFS" 62 | #endif 63 | 64 | #if !( USE_SPIFFS || USE_LITTLEFS) 65 | // EEPROM_SIZE must be <= 2048 and >= CONFIG_DATA_SIZE (currently 172 bytes) 66 | #define EEPROM_SIZE (2 * 1024) 67 | // EEPROM_START + CONFIG_DATA_SIZE must be <= EEPROM_SIZE 68 | #define EEPROM_START 0 69 | #endif 70 | 71 | ///////////////////////////////////////////// 72 | 73 | // Add customs headers from v1.2.0 74 | #define USING_CUSTOMS_STYLE true 75 | #define USING_CUSTOMS_HEAD_ELEMENT true 76 | #define USING_CORS_FEATURE true 77 | 78 | ///////////////////////////////////////////// 79 | 80 | // Force some params in Blynk, only valid for library version 1.0.1 and later 81 | #define TIMEOUT_RECONNECT_WIFI 10000L 82 | #define RESET_IF_CONFIG_TIMEOUT true 83 | 84 | #define CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET 5 85 | 86 | // Config Timeout 120s (default 60s) 87 | #define CONFIG_TIMEOUT 120000L 88 | 89 | #define USE_DYNAMIC_PARAMETERS true 90 | 91 | ///////////////////////////////////////////// 92 | 93 | #define REQUIRE_ONE_SET_SSID_PW false 94 | 95 | #define SCAN_WIFI_NETWORKS true 96 | 97 | // To be able to manually input SSID, not from a scanned SSID lists 98 | #define MANUAL_SSID_INPUT_ALLOWED true 99 | 100 | // From 2-15 101 | #define MAX_SSID_IN_LIST 8 102 | 103 | ///////////////////////////////////////////// 104 | 105 | ////////////////////////////////////////// 106 | // Those above #define's must be placed before #include 107 | 108 | //#define USE_SSL true 109 | #define USE_SSL false 110 | 111 | #if USE_SSL 112 | #include //https://github.com/khoih-prog/Blynk_Async_WM 113 | #else 114 | #include //https://github.com/khoih-prog/Blynk_Async_WM 115 | #endif 116 | 117 | #define PIN_D22 22 // Pin D22 mapped to pin GPIO22/SCL of ESP32 118 | 119 | #define DHT_PIN PIN_D22 // pin DATA @ D22 / GPIO22 120 | #define DHT_TYPE DHT11 121 | 122 | #define HOST_NAME "ESP32-Async-MTask" 123 | 124 | #endif //defines_h 125 | -------------------------------------------------------------------------------- /examples/Async_AM2315_ESP8266/defines.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | defines.h 3 | For ESP8266 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef defines_h 14 | #define defines_h 15 | 16 | #ifndef ESP8266 17 | #error This code is intended to run on the ESP8266 platform! Please check your Tools->Board setting. 18 | #endif 19 | 20 | #define BLYNK_PRINT Serial 21 | 22 | #define DOUBLERESETDETECTOR_DEBUG false 23 | #define BLYNK_WM_DEBUG 1 24 | 25 | // #define USE_SPIFFS and USE_LITTLEFS false => using EEPROM for configuration data in WiFiManager 26 | // #define USE_LITTLEFS true => using LITTLEFS for configuration data in WiFiManager 27 | // #define USE_LITTLEFS false and USE_SPIFFS true => using SPIFFS for configuration data in WiFiManager 28 | // Be sure to define USE_LITTLEFS and USE_SPIFFS before #include 29 | // From ESP8266 core 2.7.1, SPIFFS will be deprecated and to be replaced by LittleFS 30 | // Select USE_LITTLEFS (higher priority) or USE_SPIFFS 31 | 32 | #define USE_LITTLEFS true 33 | #define USE_SPIFFS false 34 | 35 | #if USE_LITTLEFS 36 | //LittleFS has higher priority 37 | #define CurrentFileFS "LittleFS" 38 | #ifdef USE_SPIFFS 39 | #undef USE_SPIFFS 40 | #endif 41 | #define USE_SPIFFS false 42 | #elif USE_SPIFFS 43 | #define CurrentFileFS "SPIFFS" 44 | #endif 45 | 46 | 47 | #if !( USE_LITTLEFS || USE_SPIFFS) 48 | // EEPROM_SIZE must be <= 4096 and >= CONFIG_DATA_SIZE (currently 172 bytes) 49 | #define EEPROM_SIZE (4 * 1024) 50 | // EEPROM_START + CONFIG_DATA_SIZE must be <= EEPROM_SIZE 51 | #define EEPROM_START 0 52 | #endif 53 | 54 | //You have to download Blynk WiFiManager Blynk_Async_WM library at //https://github.com/khoih-prog/Blynk_Async_WM 55 | // In order to enable (USE_BLYNK_WM = true). Otherwise, use (USE_BLYNK_WM = false) 56 | #define USE_BLYNK_WM true 57 | //#define USE_BLYNK_WM false 58 | 59 | #define USE_SSL false 60 | 61 | #if USE_BLYNK_WM 62 | 63 | ///////////////////////////////////////////// 64 | 65 | // Add customs headers from v1.2.0 66 | #define USING_CUSTOMS_STYLE true 67 | #define USING_CUSTOMS_HEAD_ELEMENT true 68 | #define USING_CORS_FEATURE true 69 | 70 | ///////////////////////////////////////////// 71 | 72 | // Force some params in Blynk, only valid for library version 1.0.1 and later 73 | #define TIMEOUT_RECONNECT_WIFI 10000L 74 | #define RESET_IF_CONFIG_TIMEOUT true 75 | 76 | #define CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET 5 77 | 78 | // Config Timeout 120s (default 60s) 79 | #define CONFIG_TIMEOUT 120000L 80 | 81 | #define USE_DYNAMIC_PARAMETERS true 82 | 83 | ///////////////////////////////////////////// 84 | 85 | #define REQUIRE_ONE_SET_SSID_PW false 86 | 87 | #define SCAN_WIFI_NETWORKS true 88 | 89 | // To be able to manually input SSID, not from a scanned SSID lists 90 | #define MANUAL_SSID_INPUT_ALLOWED true 91 | 92 | // From 2-15 93 | #define MAX_SSID_IN_LIST 8 94 | 95 | ///////////////////////////////////////////// 96 | 97 | ////////////////////////////////////////// 98 | // Those above #define's must be placed before #include 99 | 100 | #if USE_SSL 101 | #include //https://github.com/khoih-prog/Blynk_Async_WM 102 | #else 103 | #include //https://github.com/khoih-prog/Blynk_Async_WM 104 | #endif 105 | 106 | #include "Credentials.h" 107 | #include "dynamicParams.h" 108 | 109 | #else 110 | 111 | #if USE_SSL 112 | #include 113 | #define BLYNK_HARDWARE_PORT 9443 114 | #else 115 | #include 116 | #define BLYNK_HARDWARE_PORT 8080 117 | #endif 118 | #endif 119 | 120 | #if !USE_BLYNK_WM 121 | 122 | #ifndef LED_BUILTIN 123 | #define LED_BUILTIN 2 // Pin D2 mapped to pin GPIO2/ADC12 of ESP32, control on-board LED 124 | #endif 125 | 126 | #define USE_LOCAL_SERVER true 127 | //#define USE_LOCAL_SERVER false 128 | 129 | // If local server 130 | #if USE_LOCAL_SERVER 131 | char blynk_server[] = "yourname.duckdns.org"; 132 | #endif 133 | 134 | char auth[] = "***"; 135 | char ssid[] = "***"; 136 | char pass[] = "***"; 137 | 138 | #endif 139 | 140 | #define PIN_D1 5 // Pin D1 mapped to pin GPIO5/SCL of ESP8266 141 | #define PIN_D2 4 // Pin D2 mapped to pin GPIO4/SDA of ESP8266 142 | 143 | #define HOST_NAME "ESP8266-Async-Controller" 144 | 145 | #endif //defines_h 146 | -------------------------------------------------------------------------------- /examples/Async_DHT11ESP8266/defines.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | defines.h 3 | For ESP8266 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef defines_h 14 | #define defines_h 15 | 16 | #ifndef ESP8266 17 | #error This code is intended to run on the ESP8266 platform! Please check your Tools->Board setting. 18 | #endif 19 | 20 | #define BLYNK_PRINT Serial 21 | 22 | #define DOUBLERESETDETECTOR_DEBUG false 23 | #define BLYNK_WM_DEBUG 0 24 | 25 | // #define USE_SPIFFS and USE_LITTLEFS false => using EEPROM for configuration data in WiFiManager 26 | // #define USE_LITTLEFS true => using LITTLEFS for configuration data in WiFiManager 27 | // #define USE_LITTLEFS false and USE_SPIFFS true => using SPIFFS for configuration data in WiFiManager 28 | // Be sure to define USE_LITTLEFS and USE_SPIFFS before #include 29 | // From ESP8266 core 2.7.1, SPIFFS will be deprecated and to be replaced by LittleFS 30 | // Select USE_LITTLEFS (higher priority) or USE_SPIFFS 31 | 32 | #define USE_LITTLEFS true 33 | #define USE_SPIFFS false 34 | 35 | #if USE_LITTLEFS 36 | //LittleFS has higher priority 37 | #define CurrentFileFS "LittleFS" 38 | #ifdef USE_SPIFFS 39 | #undef USE_SPIFFS 40 | #endif 41 | #define USE_SPIFFS false 42 | #elif USE_SPIFFS 43 | #define CurrentFileFS "SPIFFS" 44 | #endif 45 | 46 | 47 | #if !( USE_LITTLEFS || USE_SPIFFS) 48 | // EEPROM_SIZE must be <= 4096 and >= CONFIG_DATA_SIZE (currently 172 bytes) 49 | #define EEPROM_SIZE (4 * 1024) 50 | // EEPROM_START + CONFIG_DATA_SIZE must be <= EEPROM_SIZE 51 | #define EEPROM_START 0 52 | #endif 53 | 54 | //You have to download Blynk WiFiManager Blynk_Async_WM library at //https://github.com/khoih-prog/Blynk_Async_WM 55 | // In order to enable (USE_BLYNK_WM = true). Otherwise, use (USE_BLYNK_WM = false) 56 | #define USE_BLYNK_WM true 57 | //#define USE_BLYNK_WM false 58 | 59 | //#define USE_SSL true 60 | #define USE_SSL false 61 | 62 | #if USE_BLYNK_WM 63 | 64 | ///////////////////////////////////////////// 65 | 66 | // Add customs headers from v1.2.0 67 | #define USING_CUSTOMS_STYLE true 68 | #define USING_CUSTOMS_HEAD_ELEMENT true 69 | #define USING_CORS_FEATURE true 70 | 71 | ///////////////////////////////////////////// 72 | 73 | // Force some params in Blynk, only valid for library version 1.0.1 and later 74 | #define TIMEOUT_RECONNECT_WIFI 10000L 75 | #define RESET_IF_CONFIG_TIMEOUT true 76 | 77 | #define CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET 5 78 | 79 | // Config Timeout 120s (default 60s) 80 | #define CONFIG_TIMEOUT 120000L 81 | 82 | #define USE_DYNAMIC_PARAMETERS true 83 | 84 | ///////////////////////////////////////////// 85 | 86 | #define REQUIRE_ONE_SET_SSID_PW false 87 | 88 | #define SCAN_WIFI_NETWORKS true 89 | 90 | // To be able to manually input SSID, not from a scanned SSID lists 91 | #define MANUAL_SSID_INPUT_ALLOWED true 92 | 93 | // From 2-15 94 | #define MAX_SSID_IN_LIST 8 95 | 96 | ///////////////////////////////////////////// 97 | 98 | ////////////////////////////////////////// 99 | // Those above #define's must be placed before #include 100 | 101 | #if USE_SSL 102 | #include //https://github.com/khoih-prog/Blynk_Async_WM 103 | #else 104 | #include //https://github.com/khoih-prog/Blynk_Async_WM 105 | #endif 106 | 107 | #include "Credentials.h" 108 | #include "dynamicParams.h" 109 | 110 | #else 111 | #if USE_SSL 112 | #include 113 | #define BLYNK_HARDWARE_PORT 9443 114 | #else 115 | #include 116 | #define BLYNK_HARDWARE_PORT 8080 117 | #endif 118 | #endif 119 | 120 | #if !USE_BLYNK_WM 121 | 122 | #ifndef LED_BUILTIN 123 | #define LED_BUILTIN 2 // Pin D2 control on-board LED 124 | #endif 125 | 126 | #define USE_LOCAL_SERVER true 127 | //#define USE_LOCAL_SERVER false 128 | 129 | // If local server 130 | #if USE_LOCAL_SERVER 131 | char blynk_server[] = "yourname.duckdns.org"; 132 | #endif 133 | 134 | char auth[] = "***"; 135 | char ssid[] = "***"; 136 | char pass[] = "***"; 137 | 138 | #endif 139 | 140 | #define PIN_LED 2 // Pin D4 mapped to pin GPIO2/TXD1 of ESP8266, NodeMCU and WeMoS, control on-board LED 141 | #define PIN_D2 4 // Pin D2 mapped to pin GPIO4 of ESP8266 142 | 143 | #define DHT_PIN PIN_D2 144 | #define DHT_TYPE DHT11 145 | 146 | #define HOST_NAME "ESP8266-DHT11-Async" 147 | 148 | #endif //defines_h 149 | -------------------------------------------------------------------------------- /examples/Async_DHT11ESP8266_Debug/defines.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | defines.h 3 | For ESP8266 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef defines_h 14 | #define defines_h 15 | 16 | #ifndef ESP8266 17 | #error This code is intended to run on the ESP8266 platform! Please check your Tools->Board setting. 18 | #endif 19 | 20 | #define BLYNK_PRINT Serial 21 | 22 | #define DOUBLERESETDETECTOR_DEBUG true 23 | #define BLYNK_WM_DEBUG 3 24 | 25 | // #define USE_SPIFFS and USE_LITTLEFS false => using EEPROM for configuration data in WiFiManager 26 | // #define USE_LITTLEFS true => using LITTLEFS for configuration data in WiFiManager 27 | // #define USE_LITTLEFS false and USE_SPIFFS true => using SPIFFS for configuration data in WiFiManager 28 | // Be sure to define USE_LITTLEFS and USE_SPIFFS before #include 29 | // From ESP8266 core 2.7.1, SPIFFS will be deprecated and to be replaced by LittleFS 30 | // Select USE_LITTLEFS (higher priority) or USE_SPIFFS 31 | 32 | #define USE_LITTLEFS true 33 | #define USE_SPIFFS false 34 | 35 | #if USE_LITTLEFS 36 | //LittleFS has higher priority 37 | #define CurrentFileFS "LittleFS" 38 | #ifdef USE_SPIFFS 39 | #undef USE_SPIFFS 40 | #endif 41 | #define USE_SPIFFS false 42 | #elif USE_SPIFFS 43 | #define CurrentFileFS "SPIFFS" 44 | #endif 45 | 46 | 47 | #if !( USE_LITTLEFS || USE_SPIFFS) 48 | // EEPROM_SIZE must be <= 4096 and >= CONFIG_DATA_SIZE (currently 172 bytes) 49 | #define EEPROM_SIZE (4 * 1024) 50 | // EEPROM_START + CONFIG_DATA_SIZE must be <= EEPROM_SIZE 51 | #define EEPROM_START 0 52 | #endif 53 | 54 | //You have to download Blynk WiFiManager Blynk_Async_WM library at //https://github.com/khoih-prog/Blynk_Async_WM 55 | // In order to enable (USE_BLYNK_WM = true). Otherwise, use (USE_BLYNK_WM = false) 56 | #define USE_BLYNK_WM true 57 | //#define USE_BLYNK_WM false 58 | 59 | //#define USE_SSL true 60 | #define USE_SSL false 61 | 62 | #if USE_BLYNK_WM 63 | 64 | ///////////////////////////////////////////// 65 | 66 | // Add customs headers from v1.2.0 67 | #define USING_CUSTOMS_STYLE true 68 | #define USING_CUSTOMS_HEAD_ELEMENT true 69 | #define USING_CORS_FEATURE true 70 | 71 | ///////////////////////////////////////////// 72 | 73 | // Force some params in Blynk, only valid for library version 1.0.1 and later 74 | #define TIMEOUT_RECONNECT_WIFI 10000L 75 | #define RESET_IF_CONFIG_TIMEOUT true 76 | 77 | #define CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET 5 78 | 79 | // Config Timeout 120s (default 60s) 80 | #define CONFIG_TIMEOUT 120000L 81 | 82 | #define USE_DYNAMIC_PARAMETERS true 83 | 84 | ///////////////////////////////////////////// 85 | 86 | #define REQUIRE_ONE_SET_SSID_PW false 87 | 88 | #define SCAN_WIFI_NETWORKS true 89 | 90 | // To be able to manually input SSID, not from a scanned SSID lists 91 | #define MANUAL_SSID_INPUT_ALLOWED true 92 | 93 | // From 2-15 94 | #define MAX_SSID_IN_LIST 8 95 | 96 | ///////////////////////////////////////////// 97 | 98 | ////////////////////////////////////////// 99 | // Those above #define's must be placed before #include 100 | 101 | #if USE_SSL 102 | #include //https://github.com/khoih-prog/Blynk_Async_WM 103 | #else 104 | #include //https://github.com/khoih-prog/Blynk_Async_WM 105 | #endif 106 | 107 | #include "Credentials.h" 108 | #include "dynamicParams.h" 109 | 110 | #else 111 | #if USE_SSL 112 | #include 113 | #define BLYNK_HARDWARE_PORT 9443 114 | #else 115 | #include 116 | #define BLYNK_HARDWARE_PORT 8080 117 | #endif 118 | #endif 119 | 120 | #if !USE_BLYNK_WM 121 | 122 | #ifndef LED_BUILTIN 123 | #define LED_BUILTIN 2 // Pin D2 control on-board LED 124 | #endif 125 | 126 | #define USE_LOCAL_SERVER true 127 | //#define USE_LOCAL_SERVER false 128 | 129 | // If local server 130 | #if USE_LOCAL_SERVER 131 | char blynk_server[] = "yourname.duckdns.org"; 132 | #endif 133 | 134 | char auth[] = "***"; 135 | char ssid[] = "***"; 136 | char pass[] = "***"; 137 | 138 | #endif 139 | 140 | #define PIN_LED 2 // Pin D4 mapped to pin GPIO2/TXD1 of ESP8266, NodeMCU and WeMoS, control on-board LED 141 | #define PIN_D2 4 // Pin D2 mapped to pin GPIO4 of ESP8266 142 | 143 | #define DHT_PIN PIN_D2 144 | #define DHT_TYPE DHT11 145 | 146 | #define HOST_NAME "8266-DHT11-AsyncDebug" 147 | 148 | #endif //defines_h 149 | -------------------------------------------------------------------------------- /examples/Async_DHT11ESP8266_SSL/defines.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | defines.h 3 | For ESP8266 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef defines_h 14 | #define defines_h 15 | 16 | #ifndef ESP8266 17 | #error This code is intended to run on the ESP8266 platform! Please check your Tools->Board setting. 18 | #endif 19 | 20 | #define BLYNK_PRINT Serial 21 | 22 | #define DOUBLERESETDETECTOR_DEBUG false 23 | #define BLYNK_WM_DEBUG 1 24 | 25 | // #define USE_SPIFFS and USE_LITTLEFS false => using EEPROM for configuration data in WiFiManager 26 | // #define USE_LITTLEFS true => using LITTLEFS for configuration data in WiFiManager 27 | // #define USE_LITTLEFS false and USE_SPIFFS true => using SPIFFS for configuration data in WiFiManager 28 | // Be sure to define USE_LITTLEFS and USE_SPIFFS before #include 29 | // From ESP8266 core 2.7.1, SPIFFS will be deprecated and to be replaced by LittleFS 30 | // Select USE_LITTLEFS (higher priority) or USE_SPIFFS 31 | 32 | #define USE_LITTLEFS true 33 | //#define USE_LITTLEFS false 34 | #define USE_SPIFFS false 35 | //#define USE_SPIFFS true 36 | 37 | #if USE_LITTLEFS 38 | //LittleFS has higher priority 39 | #define CurrentFileFS "LittleFS" 40 | #ifdef USE_SPIFFS 41 | #undef USE_SPIFFS 42 | #endif 43 | #define USE_SPIFFS false 44 | #elif USE_SPIFFS 45 | #define CurrentFileFS "SPIFFS" 46 | #endif 47 | 48 | 49 | #if !( USE_LITTLEFS || USE_SPIFFS) 50 | // EEPROM_SIZE must be <= 4096 and >= CONFIG_DATA_SIZE (currently 172 bytes) 51 | #define EEPROM_SIZE (4 * 1024) 52 | // EEPROM_START + CONFIG_DATA_SIZE must be <= EEPROM_SIZE 53 | #define EEPROM_START 0 54 | #endif 55 | 56 | //You have to download Blynk WiFiManager Blynk_Async_WM library at //https://github.com/khoih-prog/Blynk_Async_WM 57 | // In order to enable (USE_BLYNK_WM = true). Otherwise, use (USE_BLYNK_WM = false) 58 | #define USE_BLYNK_WM true 59 | //#define USE_BLYNK_WM false 60 | 61 | #define USE_SSL true 62 | //#define USE_SSL false 63 | 64 | #if USE_BLYNK_WM 65 | 66 | ///////////////////////////////////////////// 67 | 68 | // Add customs headers from v1.2.0 69 | #define USING_CUSTOMS_STYLE true 70 | #define USING_CUSTOMS_HEAD_ELEMENT true 71 | #define USING_CORS_FEATURE true 72 | 73 | ///////////////////////////////////////////// 74 | 75 | // Force some params in Blynk, only valid for library version 1.0.1 and later 76 | #define TIMEOUT_RECONNECT_WIFI 10000L 77 | #define RESET_IF_CONFIG_TIMEOUT true 78 | 79 | #define CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET 5 80 | 81 | // Config Timeout 120s (default 60s) 82 | #define CONFIG_TIMEOUT 120000L 83 | 84 | #define USE_DYNAMIC_PARAMETERS true 85 | 86 | ///////////////////////////////////////////// 87 | 88 | #define REQUIRE_ONE_SET_SSID_PW false 89 | 90 | #define SCAN_WIFI_NETWORKS true 91 | 92 | // To be able to manually input SSID, not from a scanned SSID lists 93 | #define MANUAL_SSID_INPUT_ALLOWED true 94 | 95 | // From 2-15 96 | #define MAX_SSID_IN_LIST 8 97 | 98 | ///////////////////////////////////////////// 99 | 100 | ////////////////////////////////////////// 101 | // Those above #define's must be placed before #include 102 | 103 | #if USE_SSL 104 | #include //https://github.com/khoih-prog/Blynk_Async_WM 105 | #else 106 | #include //https://github.com/khoih-prog/Blynk_Async_WM 107 | #endif 108 | 109 | #include "Credentials.h" 110 | #include "dynamicParams.h" 111 | 112 | #else 113 | #if USE_SSL 114 | #include 115 | #define BLYNK_HARDWARE_PORT 9443 116 | #else 117 | #include 118 | #define BLYNK_HARDWARE_PORT 8080 119 | #endif 120 | #endif 121 | 122 | #if !USE_BLYNK_WM 123 | 124 | #ifndef LED_BUILTIN 125 | #define LED_BUILTIN 2 // Pin D2 control on-board LED 126 | #endif 127 | 128 | #define USE_LOCAL_SERVER true 129 | //#define USE_LOCAL_SERVER false 130 | 131 | // If local server 132 | #if USE_LOCAL_SERVER 133 | char blynk_server[] = "yourname.duckdns.org"; 134 | #endif 135 | 136 | char auth[] = "***"; 137 | char ssid[] = "***"; 138 | char pass[] = "***"; 139 | 140 | #endif 141 | 142 | #define PIN_LED 2 // Pin D4 mapped to pin GPIO2/TXD1 of ESP8266, NodeMCU and WeMoS, control on-board LED 143 | #define PIN_D2 4 // Pin D2 mapped to pin GPIO4 of ESP8266 144 | 145 | #define DHT_PIN PIN_D2 146 | #define DHT_TYPE DHT11 147 | 148 | #define HOST_NAME "Async-DHT11-SSL" 149 | 150 | #endif //defines_h 151 | -------------------------------------------------------------------------------- /examples/Async_ESP8266WM_MRD_Config/defines.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | defines.h 3 | For ESP8266 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef defines_h 14 | #define defines_h 15 | 16 | #ifndef ESP8266 17 | #error This code is intended to run on the ESP8266 platform! Please check your Tools->Board setting. 18 | #endif 19 | 20 | #define BLYNK_PRINT Serial 21 | 22 | #define BLYNK_WM_DEBUG 3 23 | 24 | #define USING_MRD true 25 | 26 | #if USING_MRD 27 | // These definitions must be placed before #include to be used 28 | // Otherwise, default values (MRD_TIMES = 3, MRD_TIMEOUT = 10 seconds and MRD_ADDRESS = 0) will be used 29 | // Number of subsequent resets during MRD_TIMEOUT to activate 30 | #define MRD_TIMES 3 31 | 32 | // Number of seconds after reset during which a subseqent reset will be considered a mlti reset. 33 | #define MRD_TIMEOUT 10 34 | 35 | // RTC/EEPPROM Address for the MultiResetDetector to use 36 | #define MRD_ADDRESS 0 37 | 38 | #define MULTIRESETDETECTOR_DEBUG true 39 | 40 | #warning Using MultiResetDetector MRD 41 | #else 42 | // These definitions must be placed before #include to be used 43 | // Otherwise, default values (DRD_TIMEOUT = 10 seconds and DRD_ADDRESS = 0) will be used 44 | // Number of subsequent resets during DRD_TIMEOUT to activate 45 | 46 | // Number of seconds after reset during which a subseqent reset will be considered a mlti reset. 47 | #define DRD_TIMEOUT 10 48 | 49 | // RTC/EEPPROM Address for the DoubleResetDetector to use 50 | #define DRD_ADDRESS 0 51 | 52 | #define DOUBLERESETDETECTOR_DEBUG false 53 | 54 | #warning Using DoubleResetDetector DRD 55 | #endif 56 | 57 | // #define USE_SPIFFS and USE_LITTLEFS false => using EEPROM for configuration data in WiFiManager 58 | // #define USE_LITTLEFS true => using LITTLEFS for configuration data in WiFiManager 59 | // #define USE_LITTLEFS false and USE_SPIFFS true => using SPIFFS for configuration data in WiFiManager 60 | // Be sure to define USE_LITTLEFS and USE_SPIFFS before #include 61 | // From ESP8266 core 2.7.1, SPIFFS will be deprecated and to be replaced by LittleFS 62 | // Select USE_LITTLEFS (higher priority) or USE_SPIFFS 63 | 64 | #define USE_LITTLEFS true 65 | #define USE_SPIFFS false 66 | 67 | #if USE_LITTLEFS 68 | //LittleFS has higher priority 69 | #define CurrentFileFS "LittleFS" 70 | #ifdef USE_SPIFFS 71 | #undef USE_SPIFFS 72 | #endif 73 | #define USE_SPIFFS false 74 | #elif USE_SPIFFS 75 | #define CurrentFileFS "SPIFFS" 76 | #endif 77 | 78 | 79 | #if !( USE_LITTLEFS || USE_SPIFFS) 80 | // EEPROM_SIZE must be <= 4096 and >= CONFIG_DATA_SIZE (currently 172 bytes) 81 | #define EEPROM_SIZE (4 * 1024) 82 | // EEPROM_START + CONFIG_DATA_SIZE must be <= EEPROM_SIZE 83 | #define EEPROM_START 768 84 | #endif 85 | 86 | ///////////////////////////////////////////// 87 | 88 | // Add customs headers from v1.2.0 89 | #define USING_CUSTOMS_STYLE true 90 | #define USING_CUSTOMS_HEAD_ELEMENT true 91 | #define USING_CORS_FEATURE true 92 | 93 | ///////////////////////////////////////////// 94 | 95 | // Force some params in Blynk, only valid for library version 1.0.1 and later 96 | #define TIMEOUT_RECONNECT_WIFI 10000L 97 | #define RESET_IF_CONFIG_TIMEOUT true 98 | 99 | #define CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET 5 100 | 101 | // Config Timeout 120s (default 60s) 102 | #define CONFIG_TIMEOUT 120000L 103 | 104 | #define USE_DYNAMIC_PARAMETERS true 105 | 106 | ///////////////////////////////////////////// 107 | 108 | #define REQUIRE_ONE_SET_SSID_PW false 109 | 110 | #define SCAN_WIFI_NETWORKS true 111 | 112 | // To be able to manually input SSID, not from a scanned SSID lists 113 | #define MANUAL_SSID_INPUT_ALLOWED true 114 | 115 | // From 2-15 116 | #define MAX_SSID_IN_LIST 8 117 | 118 | ///////////////////////////////////////////// 119 | 120 | ////////////////////////////////////////// 121 | // Those above #define's must be placed before #include 122 | 123 | #define USE_SSL true 124 | //#define USE_SSL false 125 | 126 | #if USE_SSL 127 | #include //https://github.com/khoih-prog/Blynk_Async_WM 128 | #else 129 | #include //https://github.com/khoih-prog/Blynk_Async_WM 130 | #endif 131 | 132 | #define PIN_LED 2 // Pin D4 mapped to pin GPIO2/TXD1 of ESP8266, NodeMCU and WeMoS, control on-board LED 133 | #define PIN_D2 4 // Pin D2 mapped to pin GPIO4 of ESP8266 134 | 135 | #define DHT_PIN PIN_D2 136 | #define DHT_TYPE DHT11 137 | 138 | #define HOST_NAME "ESP8266-Async-Config" 139 | 140 | #endif //defines_h 141 | -------------------------------------------------------------------------------- /examples/Async_ESP8266WM_MRD_ForcedConfig/defines.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | defines.h 3 | For ESP8266 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | #ifndef defines_h 14 | #define defines_h 15 | 16 | #ifndef ESP8266 17 | #error This code is intended to run on the ESP8266 platform! Please check your Tools->Board setting. 18 | #endif 19 | 20 | #define BLYNK_PRINT Serial 21 | 22 | #define BLYNK_WM_DEBUG 1 23 | 24 | #define USING_MRD true 25 | 26 | #if USING_MRD 27 | // These definitions must be placed before #include to be used 28 | // Otherwise, default values (MRD_TIMES = 3, MRD_TIMEOUT = 10 seconds and MRD_ADDRESS = 0) will be used 29 | // Number of subsequent resets during MRD_TIMEOUT to activate 30 | #define MRD_TIMES 3 31 | 32 | // Number of seconds after reset during which a subseqent reset will be considered a mlti reset. 33 | #define MRD_TIMEOUT 10 34 | 35 | // RTC/EEPPROM Address for the MultiResetDetector to use 36 | #define MRD_ADDRESS 0 37 | 38 | #define MULTIRESETDETECTOR_DEBUG true 39 | 40 | #warning Using MultiResetDetector MRD 41 | #else 42 | // These definitions must be placed before #include to be used 43 | // Otherwise, default values (DRD_TIMEOUT = 10 seconds and DRD_ADDRESS = 0) will be used 44 | // Number of subsequent resets during DRD_TIMEOUT to activate 45 | 46 | // Number of seconds after reset during which a subseqent reset will be considered a mlti reset. 47 | #define DRD_TIMEOUT 10 48 | 49 | // RTC/EEPPROM Address for the DoubleResetDetector to use 50 | #define DRD_ADDRESS 0 51 | 52 | #define DOUBLERESETDETECTOR_DEBUG false 53 | 54 | #warning Using DoubleResetDetector DRD 55 | #endif 56 | 57 | // #define USE_SPIFFS and USE_LITTLEFS false => using EEPROM for configuration data in WiFiManager 58 | // #define USE_LITTLEFS true => using LITTLEFS for configuration data in WiFiManager 59 | // #define USE_LITTLEFS false and USE_SPIFFS true => using SPIFFS for configuration data in WiFiManager 60 | // Be sure to define USE_LITTLEFS and USE_SPIFFS before #include 61 | // From ESP8266 core 2.7.1, SPIFFS will be deprecated and to be replaced by LittleFS 62 | // Select USE_LITTLEFS (higher priority) or USE_SPIFFS 63 | 64 | #define USE_LITTLEFS true 65 | #define USE_SPIFFS false 66 | 67 | #if USE_LITTLEFS 68 | //LittleFS has higher priority 69 | #define CurrentFileFS "LittleFS" 70 | #ifdef USE_SPIFFS 71 | #undef USE_SPIFFS 72 | #endif 73 | #define USE_SPIFFS false 74 | #elif USE_SPIFFS 75 | #define CurrentFileFS "SPIFFS" 76 | #endif 77 | 78 | 79 | #if !( USE_LITTLEFS || USE_SPIFFS) 80 | // EEPROM_SIZE must be <= 4096 and >= CONFIG_DATA_SIZE (currently 172 bytes) 81 | #define EEPROM_SIZE (4 * 1024) 82 | // EEPROM_START + CONFIG_DATA_SIZE must be <= EEPROM_SIZE 83 | #define EEPROM_START 0 84 | #endif 85 | 86 | ///////////////////////////////////////////// 87 | 88 | // Add customs headers from v1.2.0 89 | #define USING_CUSTOMS_STYLE true 90 | #define USING_CUSTOMS_HEAD_ELEMENT true 91 | #define USING_CORS_FEATURE true 92 | 93 | ///////////////////////////////////////////// 94 | 95 | // Force some params in Blynk, only valid for library version 1.0.1 and later 96 | #define TIMEOUT_RECONNECT_WIFI 10000L 97 | #define RESET_IF_CONFIG_TIMEOUT true 98 | 99 | #define CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET 5 100 | 101 | // Config Timeout 120s (default 60s) 102 | #define CONFIG_TIMEOUT 120000L 103 | 104 | #define USE_DYNAMIC_PARAMETERS true 105 | 106 | ///////////////////////////////////////////// 107 | 108 | #define REQUIRE_ONE_SET_SSID_PW false 109 | 110 | #define SCAN_WIFI_NETWORKS true 111 | 112 | // To be able to manually input SSID, not from a scanned SSID lists 113 | #define MANUAL_SSID_INPUT_ALLOWED true 114 | 115 | // From 2-15 116 | #define MAX_SSID_IN_LIST 8 117 | 118 | ///////////////////////////////////////////// 119 | 120 | ////////////////////////////////////////// 121 | // Those above #define's must be placed before #include 122 | 123 | //#define USE_SSL true 124 | #define USE_SSL false 125 | 126 | #if USE_SSL 127 | #include //https://github.com/khoih-prog/Blynk_Async_WM 128 | #else 129 | #include //https://github.com/khoih-prog/Blynk_Async_WM 130 | #endif 131 | 132 | #define PIN_LED 2 // Pin D4 mapped to pin GPIO2/TXD1 of ESP8266, NodeMCU and WeMoS, control on-board LED 133 | #define PIN_D2 4 // Pin D2 mapped to pin GPIO4 of ESP8266 134 | 135 | #define DHT_PIN PIN_D2 136 | #define DHT_TYPE DHT11 137 | 138 | #define HOST_NAME "ESP8266-Async-Config" 139 | 140 | #endif //defines_h 141 | -------------------------------------------------------------------------------- /examples/Async_ESP32WM_Config/defines.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | defines.h 3 | For ESP32 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | /* 14 | // To add something similar to this for ESP32-C3 15 | #if CONFIG_IDF_TARGET_ESP32 16 | 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}; 17 | #elif CONFIG_IDF_TARGET_ESP32S2 18 | 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}; 19 | #elif CONFIG_IDF_TARGET_ESP32C3 20 | 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}; 21 | #endif 22 | */ 23 | 24 | #ifndef defines_h 25 | #define defines_h 26 | 27 | #if !( defined(ESP32) ) 28 | #error This code is intended to run on the ESP32 platform! Please check your Tools->Board setting. 29 | #elif ( ARDUINO_ESP32S2_DEV || ARDUINO_FEATHERS2 || ARDUINO_ESP32S2_THING_PLUS || ARDUINO_MICROS2 || \ 30 | ARDUINO_METRO_ESP32S2 || ARDUINO_MAGTAG29_ESP32S2 || ARDUINO_FUNHOUSE_ESP32S2 || \ 31 | ARDUINO_ADAFRUIT_FEATHER_ESP32S2_NOPSRAM ) 32 | #define BOARD_TYPE "ESP32-S2" 33 | #elif ( ARDUINO_ESP32C3_DEV ) 34 | // https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-gpio.c 35 | #warning ESP32-C3 boards not fully supported yet. Only SPIFFS and EEPROM OK. Tempo esp32_adc2gpio to be replaced. ESPAsyncWebServer library to be fixed 36 | 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}; 37 | #define BOARD_TYPE "ESP32-C3" 38 | #else 39 | #define BOARD_TYPE "ESP32" 40 | #endif 41 | 42 | #define BLYNK_PRINT Serial 43 | 44 | #define DOUBLERESETDETECTOR_DEBUG false 45 | #define BLYNK_WM_DEBUG 3 46 | 47 | // Not use #define USE_LITTLEFS and #define USE_SPIFFS => using SPIFFS for configuration data in WiFiManager 48 | // (USE_LITTLEFS == false) and (USE_SPIFFS == false) => using EEPROM for configuration data in WiFiManager 49 | // (USE_LITTLEFS == true) and (USE_SPIFFS == false) => using LITTLEFS for configuration data in WiFiManager 50 | // (USE_LITTLEFS == true) and (USE_SPIFFS == true) => using LITTLEFS for configuration data in WiFiManager 51 | // (USE_LITTLEFS == false) and (USE_SPIFFS == true) => using SPIFFS for configuration data in WiFiManager 52 | // Those above #define's must be placed before #include 53 | 54 | #if ( ARDUINO_ESP32C3_DEV ) 55 | // Currently, ESP32-C3 only supporting SPIFFS and EEPROM. Will fix to support LittleFS 56 | #define USE_LITTLEFS false 57 | #define USE_SPIFFS true 58 | #else 59 | #define USE_LITTLEFS true 60 | #define USE_SPIFFS false 61 | #endif 62 | 63 | #if USE_LITTLEFS 64 | //LittleFS has higher priority 65 | #define CurrentFileFS "LittleFS" 66 | #ifdef USE_SPIFFS 67 | #undef USE_SPIFFS 68 | #endif 69 | #define USE_SPIFFS false 70 | #elif USE_SPIFFS 71 | #define CurrentFileFS "SPIFFS" 72 | #endif 73 | 74 | #if !( USE_SPIFFS || USE_LITTLEFS) 75 | // EEPROM_SIZE must be <= 2048 and >= CONFIG_DATA_SIZE (currently 172 bytes) 76 | #define EEPROM_SIZE (2 * 1024) 77 | // EEPROM_START + CONFIG_DATA_SIZE must be <= EEPROM_SIZE 78 | #define EEPROM_START 0 79 | #endif 80 | 81 | ///////////////////////////////////////////// 82 | 83 | // Add customs headers from v1.2.0 84 | #define USING_CUSTOMS_STYLE true 85 | #define USING_CUSTOMS_HEAD_ELEMENT true 86 | #define USING_CORS_FEATURE true 87 | 88 | ///////////////////////////////////////////// 89 | 90 | // Force some params in Blynk, only valid for library version 1.0.1 and later 91 | #define TIMEOUT_RECONNECT_WIFI 10000L 92 | #define RESET_IF_CONFIG_TIMEOUT true 93 | 94 | #define CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET 5 95 | 96 | // Config Timeout 120s (default 60s) 97 | #define CONFIG_TIMEOUT 120000L 98 | 99 | #define USE_DYNAMIC_PARAMETERS true 100 | 101 | ///////////////////////////////////////////// 102 | 103 | #define REQUIRE_ONE_SET_SSID_PW false 104 | 105 | #define SCAN_WIFI_NETWORKS true 106 | 107 | // To be able to manually input SSID, not from a scanned SSID lists 108 | #define MANUAL_SSID_INPUT_ALLOWED true 109 | 110 | // From 2-15 111 | #define MAX_SSID_IN_LIST 8 112 | 113 | ///////////////////////////////////////////// 114 | 115 | ////////////////////////////////////////// 116 | // Those above #define's must be placed before #include 117 | 118 | //#define USE_SSL true 119 | #define USE_SSL false 120 | 121 | #if USE_SSL 122 | #include //https://github.com/khoih-prog/Blynk_Async_WM 123 | #else 124 | #include //https://github.com/khoih-prog/Blynk_Async_WM 125 | #endif 126 | 127 | #define PIN_D22 22 // Pin D22 mapped to pin GPIO22/SCL of ESP32 128 | 129 | #define DHT_PIN PIN_D22 // pin DATA @ D22 / GPIO22 130 | #define DHT_TYPE DHT11 131 | 132 | #define HOST_NAME "ESP32-Async-Controller" 133 | 134 | #endif //defines_h 135 | -------------------------------------------------------------------------------- /examples/Async_ESP32WM_ForcedConfig/defines.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | defines.h 3 | For ESP32 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | /* 14 | // To add something similar to this for ESP32-C3 15 | #if CONFIG_IDF_TARGET_ESP32 16 | 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}; 17 | #elif CONFIG_IDF_TARGET_ESP32S2 18 | 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}; 19 | #elif CONFIG_IDF_TARGET_ESP32C3 20 | 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}; 21 | #endif 22 | */ 23 | 24 | #ifndef defines_h 25 | #define defines_h 26 | 27 | #if !( defined(ESP32) ) 28 | #error This code is intended to run on the ESP32 platform! Please check your Tools->Board setting. 29 | #elif ( ARDUINO_ESP32S2_DEV || ARDUINO_FEATHERS2 || ARDUINO_ESP32S2_THING_PLUS || ARDUINO_MICROS2 || \ 30 | ARDUINO_METRO_ESP32S2 || ARDUINO_MAGTAG29_ESP32S2 || ARDUINO_FUNHOUSE_ESP32S2 || \ 31 | ARDUINO_ADAFRUIT_FEATHER_ESP32S2_NOPSRAM ) 32 | #define BOARD_TYPE "ESP32-S2" 33 | #elif ( ARDUINO_ESP32C3_DEV ) 34 | // https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-gpio.c 35 | #warning ESP32-C3 boards not fully supported yet. Only SPIFFS and EEPROM OK. Tempo esp32_adc2gpio to be replaced. ESPAsyncWebServer library to be fixed 36 | 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}; 37 | #define BOARD_TYPE "ESP32-C3" 38 | #else 39 | #define BOARD_TYPE "ESP32" 40 | #endif 41 | 42 | #define BLYNK_PRINT Serial 43 | 44 | #define DOUBLERESETDETECTOR_DEBUG false 45 | #define BLYNK_WM_DEBUG 3 46 | 47 | // Not use #define USE_LITTLEFS and #define USE_SPIFFS => using SPIFFS for configuration data in WiFiManager 48 | // (USE_LITTLEFS == false) and (USE_SPIFFS == false) => using EEPROM for configuration data in WiFiManager 49 | // (USE_LITTLEFS == true) and (USE_SPIFFS == false) => using LITTLEFS for configuration data in WiFiManager 50 | // (USE_LITTLEFS == true) and (USE_SPIFFS == true) => using LITTLEFS for configuration data in WiFiManager 51 | // (USE_LITTLEFS == false) and (USE_SPIFFS == true) => using SPIFFS for configuration data in WiFiManager 52 | // Those above #define's must be placed before #include 53 | 54 | #if ( ARDUINO_ESP32C3_DEV ) 55 | // Currently, ESP32-C3 only supporting SPIFFS and EEPROM. Will fix to support LittleFS 56 | #define USE_LITTLEFS false 57 | #define USE_SPIFFS true 58 | #else 59 | #define USE_LITTLEFS true 60 | #define USE_SPIFFS false 61 | #endif 62 | 63 | #if USE_LITTLEFS 64 | //LittleFS has higher priority 65 | #define CurrentFileFS "LittleFS" 66 | #ifdef USE_SPIFFS 67 | #undef USE_SPIFFS 68 | #endif 69 | #define USE_SPIFFS false 70 | #elif USE_SPIFFS 71 | #define CurrentFileFS "SPIFFS" 72 | #endif 73 | 74 | #if !( USE_SPIFFS || USE_LITTLEFS) 75 | // EEPROM_SIZE must be <= 2048 and >= CONFIG_DATA_SIZE (currently 172 bytes) 76 | #define EEPROM_SIZE (2 * 1024) 77 | // EEPROM_START + CONFIG_DATA_SIZE must be <= EEPROM_SIZE 78 | #define EEPROM_START 0 79 | #endif 80 | 81 | ///////////////////////////////////////////// 82 | 83 | // Add customs headers from v1.2.0 84 | #define USING_CUSTOMS_STYLE true 85 | #define USING_CUSTOMS_HEAD_ELEMENT true 86 | #define USING_CORS_FEATURE true 87 | 88 | ///////////////////////////////////////////// 89 | 90 | // Force some params in Blynk, only valid for library version 1.0.1 and later 91 | #define TIMEOUT_RECONNECT_WIFI 10000L 92 | #define RESET_IF_CONFIG_TIMEOUT true 93 | 94 | #define CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET 5 95 | 96 | // Config Timeout 120s (default 60s) 97 | #define CONFIG_TIMEOUT 120000L 98 | 99 | #define USE_DYNAMIC_PARAMETERS true 100 | 101 | ///////////////////////////////////////////// 102 | 103 | #define REQUIRE_ONE_SET_SSID_PW false 104 | 105 | #define SCAN_WIFI_NETWORKS true 106 | 107 | // To be able to manually input SSID, not from a scanned SSID lists 108 | #define MANUAL_SSID_INPUT_ALLOWED true 109 | 110 | // From 2-15 111 | #define MAX_SSID_IN_LIST 8 112 | 113 | ///////////////////////////////////////////// 114 | 115 | ////////////////////////////////////////// 116 | // Those above #define's must be placed before #include 117 | 118 | #define USE_SSL true 119 | //#define USE_SSL false 120 | 121 | #if USE_SSL 122 | #include //https://github.com/khoih-prog/Blynk_Async_WM 123 | #else 124 | #include //https://github.com/khoih-prog/Blynk_Async_WM 125 | #endif 126 | 127 | #define PIN_D22 22 // Pin D22 mapped to pin GPIO22/SCL of ESP32 128 | 129 | #define DHT_PIN PIN_D22 // pin DATA @ D22 / GPIO22 130 | #define DHT_TYPE DHT11 131 | 132 | #define HOST_NAME "ESP32-Async-Controller" 133 | 134 | #endif //defines_h 135 | -------------------------------------------------------------------------------- /keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Data types (KEYWORD1) 3 | ####################################### 4 | Blynk KEYWORD1 5 | BlynkTimer KEYWORD1 6 | WidgetBridge KEYWORD1 7 | WidgetLCD KEYWORD1 8 | WidgetLED KEYWORD1 9 | WidgetRTC KEYWORD1 10 | WidgetSD KEYWORD1 11 | WidgetTerminal KEYWORD1 12 | WidgetMap KEYWORD1 13 | WidgetTable KEYWORD1 14 | BlynkParam KEYWORD1 15 | BlynkParamAllocated KEYWORD1 16 | MenuItem KEYWORD1 17 | WiFi_Credentials KEYWORD1 18 | Blynk_Credentials KEYWORD1 19 | Blynk_WM_Configuration KEYWORD1 20 | 21 | ####################################### 22 | # Methods and Functions (KEYWORD2) 23 | ####################################### 24 | begin KEYWORD2 25 | config KEYWORD2 26 | run KEYWORD2 27 | connect KEYWORD2 28 | connected KEYWORD2 29 | tweet KEYWORD2 30 | notify KEYWORD2 31 | email KEYWORD2 32 | virtualWrite KEYWORD2 33 | virtualWriteBinary KEYWORD2 34 | syncAll KEYWORD2 35 | syncVirtual KEYWORD2 36 | setProperty KEYWORD2 37 | logEvent KEYWORD2 38 | loadConfigData KEYWORD2 39 | saveConfigData KEYWORD2 40 | getConfigData KEYWORD2 41 | connectMultiWiFi KEYWORD2 42 | connectMultiBlynk KEYWORD2 43 | handleRequest KEYWORD2 44 | startConfigurationMode KEYWORD2 45 | setHostname KEYWORD2 46 | setConfigPortalIP KEYWORD2 47 | setConfigPortal KEYWORD2 48 | setConfigPortalChannel KEYWORD2 49 | setSTAStaticIPConfig KEYWORD2 50 | getWiFiSSID KEYWORD2 51 | getWiFiPW KEYWORD2 52 | getServerName KEYWORD2 53 | getToken KEYWORD2 54 | getBoardName KEYWORD2 55 | getHWPort KEYWORD2 56 | getFullConfigData KEYWORD2 57 | clearConfigData KEYWORD2 58 | resetAndEnterConfigPortal KEYWORD2 59 | resetAndEnterConfigPortalPersistent KEYWORD2 60 | setCustomsStyle KEYWORD2 61 | getCustomsStyle KEYWORD2 62 | setCustomsHeadElement KEYWORD2 63 | getCustomsHeadElement KEYWORD2 64 | setCORSHeader KEYWORD2 65 | getCORSHeader KEYWORD2 66 | 67 | ############################# 68 | # Handler helpers (KEYWORD2) 69 | ############################# 70 | 71 | BLYNK_READ KEYWORD2 72 | BLYNK_WRITE KEYWORD2 73 | BLYNK_READ_DEFAULT KEYWORD2 74 | BLYNK_WRITE_DEFAULT KEYWORD2 75 | BLYNK_ATTACH_WIDGET KEYWORD2 76 | BLYNK_CONNECTED KEYWORD2 77 | #BLYNK_DISCONNECTED KEYWORD2 78 | BLYNK_APP_CONNECTED KEYWORD2 79 | BLYNK_APP_DISCONNECTED KEYWORD2 80 | 81 | BLYNK_OUTPUT KEYWORD2 82 | BLYNK_INPUT KEYWORD2 83 | BLYNK_OUTPUT_DEFAULT KEYWORD2 84 | BLYNK_INPUT_DEFAULT KEYWORD2 85 | 86 | ############################### 87 | # Variables binding (KEYWORD2) 88 | ############################### 89 | 90 | BLYNK_VAR_INT KEYWORD2 91 | BLYNK_VAR_LONG KEYWORD2 92 | BLYNK_VAR_DOUBLE KEYWORD2 93 | BLYNK_VAR_STRING KEYWORD2 94 | 95 | ############################### 96 | # Special defines (KEYWORD2) 97 | ############################### 98 | 99 | BLYNK_DEBUG KEYWORD2 100 | BLYNK_DEBUG_ALL KEYWORD2 101 | BLYNK_PRINT KEYWORD2 102 | 103 | BLYNK_HEARTBEAT KEYWORD2 104 | BLYNK_EXPERIMENTAL KEYWORD2 105 | BLYNK_NO_BUILTIN KEYWORD2 106 | BLYNK_NO_FLOAT KEYWORD2 107 | BLYNK_NO_FANCY_LOGO KEYWORD2 108 | BLYNK_FANCY_LOGO_3D KEYWORD2 109 | BLYNK_USE_DIRECT_CONNECT KEYWORD2 110 | BLYNK_MAX_SENDBYTES KEYWORD2 111 | BLYNK_MAX_READBYTES KEYWORD2 112 | 113 | ############################### 114 | # Periodic actions (KEYWORD2) 115 | ############################### 116 | #BLYNK_EVERY_N_MILLIS KEYWORD2 117 | #BLYNK_EVERY_N_SECONDS KEYWORD2 118 | #BLYNK_EVERY_N_MINUTES KEYWORD2 119 | #BLYNK_EVERY_N_HOURS KEYWORD2 120 | 121 | ####################################### 122 | # Literals (LITERAL1) 123 | ####################################### 124 | 125 | # Virtual pins 126 | V0 LITERAL1 127 | V1 LITERAL1 128 | V2 LITERAL1 129 | V3 LITERAL1 130 | V4 LITERAL1 131 | V5 LITERAL1 132 | V6 LITERAL1 133 | V7 LITERAL1 134 | V8 LITERAL1 135 | V9 LITERAL1 136 | V10 LITERAL1 137 | V11 LITERAL1 138 | V12 LITERAL1 139 | V13 LITERAL1 140 | V14 LITERAL1 141 | V15 LITERAL1 142 | V16 LITERAL1 143 | V17 LITERAL1 144 | V18 LITERAL1 145 | V19 LITERAL1 146 | V20 LITERAL1 147 | V21 LITERAL1 148 | V22 LITERAL1 149 | V23 LITERAL1 150 | V24 LITERAL1 151 | V25 LITERAL1 152 | V26 LITERAL1 153 | V27 LITERAL1 154 | V28 LITERAL1 155 | V29 LITERAL1 156 | V30 LITERAL1 157 | V31 LITERAL1 158 | V32 LITERAL1 159 | V33 LITERAL1 160 | V34 LITERAL1 161 | V35 LITERAL1 162 | V36 LITERAL1 163 | V37 LITERAL1 164 | V38 LITERAL1 165 | V39 LITERAL1 166 | V40 LITERAL1 167 | V41 LITERAL1 168 | V42 LITERAL1 169 | V43 LITERAL1 170 | V44 LITERAL1 171 | V45 LITERAL1 172 | V46 LITERAL1 173 | V47 LITERAL1 174 | V48 LITERAL1 175 | V49 LITERAL1 176 | V50 LITERAL1 177 | V51 LITERAL1 178 | V52 LITERAL1 179 | V53 LITERAL1 180 | V54 LITERAL1 181 | V55 LITERAL1 182 | V56 LITERAL1 183 | V57 LITERAL1 184 | V58 LITERAL1 185 | V59 LITERAL1 186 | V60 LITERAL1 187 | V61 LITERAL1 188 | V62 LITERAL1 189 | V63 LITERAL1 190 | V64 LITERAL1 191 | V65 LITERAL1 192 | V66 LITERAL1 193 | V67 LITERAL1 194 | V68 LITERAL1 195 | V69 LITERAL1 196 | V70 LITERAL1 197 | V71 LITERAL1 198 | V72 LITERAL1 199 | V73 LITERAL1 200 | V74 LITERAL1 201 | V75 LITERAL1 202 | V76 LITERAL1 203 | V77 LITERAL1 204 | V78 LITERAL1 205 | V79 LITERAL1 206 | V80 LITERAL1 207 | V81 LITERAL1 208 | V82 LITERAL1 209 | V83 LITERAL1 210 | V84 LITERAL1 211 | V85 LITERAL1 212 | V86 LITERAL1 213 | V87 LITERAL1 214 | V88 LITERAL1 215 | V89 LITERAL1 216 | V90 LITERAL1 217 | V91 LITERAL1 218 | V92 LITERAL1 219 | V93 LITERAL1 220 | V94 LITERAL1 221 | V95 LITERAL1 222 | V96 LITERAL1 223 | V97 LITERAL1 224 | V98 LITERAL1 225 | V99 LITERAL1 226 | V100 LITERAL1 227 | V101 LITERAL1 228 | V102 LITERAL1 229 | V103 LITERAL1 230 | V104 LITERAL1 231 | V105 LITERAL1 232 | V106 LITERAL1 233 | V107 LITERAL1 234 | V108 LITERAL1 235 | V109 LITERAL1 236 | V110 LITERAL1 237 | V111 LITERAL1 238 | V112 LITERAL1 239 | V113 LITERAL1 240 | V114 LITERAL1 241 | V115 LITERAL1 242 | V116 LITERAL1 243 | V117 LITERAL1 244 | V118 LITERAL1 245 | V119 LITERAL1 246 | V120 LITERAL1 247 | V121 LITERAL1 248 | V122 LITERAL1 249 | V123 LITERAL1 250 | V124 LITERAL1 251 | V125 LITERAL1 252 | V126 LITERAL1 253 | V127 LITERAL1 254 | -------------------------------------------------------------------------------- /examples/ESP32_MultiTask/AsyncMT_ESP32WM_Config/defines.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | defines.h 3 | For ESP32 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | /* 14 | // To add something similar to this for ESP32-C3 15 | #if CONFIG_IDF_TARGET_ESP32 16 | 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}; 17 | #elif CONFIG_IDF_TARGET_ESP32S2 18 | 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}; 19 | #elif CONFIG_IDF_TARGET_ESP32C3 20 | 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}; 21 | #endif 22 | */ 23 | 24 | #ifndef defines_h 25 | #define defines_h 26 | 27 | #if !( defined(ESP32) ) 28 | #error This code is intended to run on the ESP32 platform! Please check your Tools->Board setting. 29 | #elif ( ARDUINO_ESP32S2_DEV || ARDUINO_FEATHERS2 || ARDUINO_ESP32S2_THING_PLUS || ARDUINO_MICROS2 || \ 30 | ARDUINO_METRO_ESP32S2 || ARDUINO_MAGTAG29_ESP32S2 || ARDUINO_FUNHOUSE_ESP32S2 || \ 31 | ARDUINO_ADAFRUIT_FEATHER_ESP32S2_NOPSRAM ) 32 | #define BOARD_TYPE "ESP32-S2" 33 | #elif ( ARDUINO_ESP32C3_DEV ) 34 | // https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-gpio.c 35 | #warning ESP32-C3 boards not fully supported yet. Only SPIFFS and EEPROM OK. Tempo esp32_adc2gpio to be replaced. ESPAsyncWebServer library to be fixed 36 | 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}; 37 | #define BOARD_TYPE "ESP32-C3" 38 | #else 39 | #define BOARD_TYPE "ESP32" 40 | #endif 41 | 42 | #define BLYNK_PRINT Serial 43 | 44 | #define DOUBLERESETDETECTOR_DEBUG false 45 | #define BLYNK_WM_DEBUG 3 46 | 47 | #define BLYNK_WM_RTOS_DEBUG 1 48 | 49 | // Not use #define USE_LITTLEFS and #define USE_SPIFFS => using SPIFFS for configuration data in WiFiManager 50 | // (USE_LITTLEFS == false) and (USE_SPIFFS == false) => using EEPROM for configuration data in WiFiManager 51 | // (USE_LITTLEFS == true) and (USE_SPIFFS == false) => using LITTLEFS for configuration data in WiFiManager 52 | // (USE_LITTLEFS == true) and (USE_SPIFFS == true) => using LITTLEFS for configuration data in WiFiManager 53 | // (USE_LITTLEFS == false) and (USE_SPIFFS == true) => using SPIFFS for configuration data in WiFiManager 54 | // Those above #define's must be placed before #include 55 | 56 | #if ( ARDUINO_ESP32C3_DEV ) 57 | // Currently, ESP32-C3 only supporting SPIFFS and EEPROM. Will fix to support LittleFS 58 | #define USE_LITTLEFS false 59 | #define USE_SPIFFS true 60 | #else 61 | #define USE_LITTLEFS true 62 | #define USE_SPIFFS false 63 | #endif 64 | 65 | #if USE_LITTLEFS 66 | //LittleFS has higher priority 67 | #define CurrentFileFS "LittleFS" 68 | #ifdef USE_SPIFFS 69 | #undef USE_SPIFFS 70 | #endif 71 | #define USE_SPIFFS false 72 | #elif USE_SPIFFS 73 | #define CurrentFileFS "SPIFFS" 74 | #endif 75 | 76 | #if !( USE_SPIFFS || USE_LITTLEFS) 77 | // EEPROM_SIZE must be <= 2048 and >= CONFIG_DATA_SIZE (currently 172 bytes) 78 | #define EEPROM_SIZE (2 * 1024) 79 | // EEPROM_START + CONFIG_DATA_SIZE must be <= EEPROM_SIZE 80 | #define EEPROM_START 0 81 | #endif 82 | 83 | ///////////////////////////////////////////// 84 | 85 | // Add customs headers from v1.2.0 86 | #define USING_CUSTOMS_STYLE true 87 | #define USING_CUSTOMS_HEAD_ELEMENT true 88 | #define USING_CORS_FEATURE true 89 | 90 | ///////////////////////////////////////////// 91 | 92 | // Force some params in Blynk, only valid for library version 1.0.1 and later 93 | #define TIMEOUT_RECONNECT_WIFI 10000L 94 | #define RESET_IF_CONFIG_TIMEOUT true 95 | 96 | #define CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET 5 97 | 98 | // Config Timeout 120s (default 60s) 99 | #define CONFIG_TIMEOUT 120000L 100 | 101 | #define USE_DYNAMIC_PARAMETERS true 102 | 103 | ///////////////////////////////////////////// 104 | 105 | #define REQUIRE_ONE_SET_SSID_PW false 106 | 107 | #define SCAN_WIFI_NETWORKS true 108 | 109 | // To be able to manually input SSID, not from a scanned SSID lists 110 | #define MANUAL_SSID_INPUT_ALLOWED true 111 | 112 | // From 2-15 113 | #define MAX_SSID_IN_LIST 8 114 | 115 | ///////////////////////////////////////////// 116 | 117 | ////////////////////////////////////////// 118 | // Those above #define's must be placed before #include 119 | 120 | //#define USE_SSL true 121 | #define USE_SSL false 122 | 123 | #if USE_SSL 124 | #include //https://github.com/khoih-prog/Blynk_Async_WM 125 | #else 126 | #include //https://github.com/khoih-prog/Blynk_Async_WM 127 | #endif 128 | 129 | #include "Credentials.h" 130 | #include "dynamicParams.h" 131 | 132 | #define PIN_D22 22 // Pin D22 mapped to pin GPIO22/SCL of ESP32 133 | 134 | #define DHT_PIN PIN_D22 // pin DATA @ D22 / GPIO22 135 | #define DHT_TYPE DHT11 136 | 137 | #define HOST_NAME "ESP32-Async-Controller" 138 | 139 | #endif //defines_h 140 | -------------------------------------------------------------------------------- /examples/ESP32_MultiTask/AsyncMT_ESP32WM_ForcedConfig/defines.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | defines.h 3 | For ESP32 boards 4 | 5 | Blynk_Async_WM is a library, using AsyncWebServer instead of (ESP8266)WebServer for the ESP8266/ESP32 to enable easy 6 | configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk. 7 | 8 | Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases) 9 | Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM) 10 | Licensed under MIT license 11 | ********************************************************************************************************************************/ 12 | 13 | /* 14 | // To add something similar to this for ESP32-C3 15 | #if CONFIG_IDF_TARGET_ESP32 16 | 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}; 17 | #elif CONFIG_IDF_TARGET_ESP32S2 18 | 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}; 19 | #elif CONFIG_IDF_TARGET_ESP32C3 20 | 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}; 21 | #endif 22 | */ 23 | 24 | #ifndef defines_h 25 | #define defines_h 26 | 27 | #if !( defined(ESP32) ) 28 | #error This code is intended to run on the ESP32 platform! Please check your Tools->Board setting. 29 | #elif ( ARDUINO_ESP32S2_DEV || ARDUINO_FEATHERS2 || ARDUINO_ESP32S2_THING_PLUS || ARDUINO_MICROS2 || \ 30 | ARDUINO_METRO_ESP32S2 || ARDUINO_MAGTAG29_ESP32S2 || ARDUINO_FUNHOUSE_ESP32S2 || \ 31 | ARDUINO_ADAFRUIT_FEATHER_ESP32S2_NOPSRAM ) 32 | #define BOARD_TYPE "ESP32-S2" 33 | #elif ( ARDUINO_ESP32C3_DEV ) 34 | // https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-gpio.c 35 | #warning ESP32-C3 boards not fully supported yet. Only SPIFFS and EEPROM OK. Tempo esp32_adc2gpio to be replaced. ESPAsyncWebServer library to be fixed 36 | 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}; 37 | #define BOARD_TYPE "ESP32-C3" 38 | #else 39 | #define BOARD_TYPE "ESP32" 40 | #endif 41 | 42 | #define BLYNK_PRINT Serial 43 | 44 | #define DOUBLERESETDETECTOR_DEBUG false 45 | #define BLYNK_WM_DEBUG 3 46 | 47 | #define BLYNK_WM_RTOS_DEBUG 1 48 | 49 | // Not use #define USE_LITTLEFS and #define USE_SPIFFS => using SPIFFS for configuration data in WiFiManager 50 | // (USE_LITTLEFS == false) and (USE_SPIFFS == false) => using EEPROM for configuration data in WiFiManager 51 | // (USE_LITTLEFS == true) and (USE_SPIFFS == false) => using LITTLEFS for configuration data in WiFiManager 52 | // (USE_LITTLEFS == true) and (USE_SPIFFS == true) => using LITTLEFS for configuration data in WiFiManager 53 | // (USE_LITTLEFS == false) and (USE_SPIFFS == true) => using SPIFFS for configuration data in WiFiManager 54 | // Those above #define's must be placed before #include 55 | 56 | #if ( ARDUINO_ESP32C3_DEV ) 57 | // Currently, ESP32-C3 only supporting SPIFFS and EEPROM. Will fix to support LittleFS 58 | #define USE_LITTLEFS false 59 | #define USE_SPIFFS true 60 | #else 61 | #define USE_LITTLEFS true 62 | #define USE_SPIFFS false 63 | #endif 64 | 65 | #if USE_LITTLEFS 66 | //LittleFS has higher priority 67 | #define CurrentFileFS "LittleFS" 68 | #ifdef USE_SPIFFS 69 | #undef USE_SPIFFS 70 | #endif 71 | #define USE_SPIFFS false 72 | #elif USE_SPIFFS 73 | #define CurrentFileFS "SPIFFS" 74 | #endif 75 | 76 | #if !( USE_SPIFFS || USE_LITTLEFS) 77 | // EEPROM_SIZE must be <= 2048 and >= CONFIG_DATA_SIZE (currently 172 bytes) 78 | #define EEPROM_SIZE (2 * 1024) 79 | // EEPROM_START + CONFIG_DATA_SIZE must be <= EEPROM_SIZE 80 | #define EEPROM_START 0 81 | #endif 82 | 83 | ///////////////////////////////////////////// 84 | 85 | // Add customs headers from v1.2.0 86 | #define USING_CUSTOMS_STYLE true 87 | #define USING_CUSTOMS_HEAD_ELEMENT true 88 | #define USING_CORS_FEATURE true 89 | 90 | ///////////////////////////////////////////// 91 | 92 | // Force some params in Blynk, only valid for library version 1.0.1 and later 93 | #define TIMEOUT_RECONNECT_WIFI 10000L 94 | #define RESET_IF_CONFIG_TIMEOUT true 95 | 96 | #define CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET 5 97 | 98 | // Config Timeout 120s (default 60s) 99 | #define CONFIG_TIMEOUT 120000L 100 | 101 | #define USE_DYNAMIC_PARAMETERS true 102 | 103 | ///////////////////////////////////////////// 104 | 105 | #define REQUIRE_ONE_SET_SSID_PW false 106 | 107 | #define SCAN_WIFI_NETWORKS true 108 | 109 | // To be able to manually input SSID, not from a scanned SSID lists 110 | #define MANUAL_SSID_INPUT_ALLOWED true 111 | 112 | // From 2-15 113 | #define MAX_SSID_IN_LIST 8 114 | 115 | ///////////////////////////////////////////// 116 | 117 | ////////////////////////////////////////// 118 | // Those above #define's must be placed before #include 119 | 120 | //#define USE_SSL true 121 | #define USE_SSL false 122 | 123 | #if USE_SSL 124 | #include //https://github.com/khoih-prog/Blynk_Async_WM 125 | #else 126 | #include //https://github.com/khoih-prog/Blynk_Async_WM 127 | #endif 128 | 129 | #include "Credentials.h" 130 | #include "dynamicParams.h" 131 | 132 | #define PIN_D22 22 // Pin D22 mapped to pin GPIO22/SCL of ESP32 133 | 134 | #define DHT_PIN PIN_D22 // pin DATA @ D22 / GPIO22 135 | #define DHT_TYPE DHT11 136 | 137 | #define HOST_NAME "ESP32-Async-Controller" 138 | 139 | #endif //defines_h 140 | --------------------------------------------------------------------------------