This repository has been archived by the owner on Nov 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Credentials.h
87 lines (71 loc) · 2.31 KB
/
Credentials.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/****************************************************************************************************************************
Credentials.h for DHT11ESP32_SSL.ino
For ESP32 boards
Blynk_WM is a library for the ESP8266/ESP32 Arduino platform (https://github.com/esp8266/Arduino) to enable easy
configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk
Forked from Blynk library v0.6.1 https://github.com/blynkkk/blynk-library/releases
Built by Khoi Hoang https://github.com/khoih-prog/Blynk_WM
Licensed under MIT license
*****************************************************************************************************************************/
#ifndef Credentials_h
#define Credentials_h
/// Start Default Config Data //////////////////
/*
// Defined in <BlynkSimpleEsp32_WM.h> and <BlynkSimpleEsp32_SSL_WM.h>
#define SSID_MAX_LEN 32
#define PASS_MAX_LEN 64
typedef struct
{
char wifi_ssid[SSID_MAX_LEN];
char wifi_pw [PASS_MAX_LEN];
} WiFi_Credentials;
#define BLYNK_SERVER_MAX_LEN 32
#define BLYNK_TOKEN_MAX_LEN 36
typedef struct
{
char blynk_server[BLYNK_SERVER_MAX_LEN];
char blynk_token [BLYNK_TOKEN_MAX_LEN];
} Blynk_Credentials;
#define NUM_WIFI_CREDENTIALS 2
#define NUM_BLYNK_CREDENTIALS 2
typedef struct Configuration
{
char header [16];
WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS];
Blynk_Credentials Blynk_Creds [NUM_BLYNK_CREDENTIALS];
int blynk_port;
char board_name [24];
int checkSum;
} Blynk_WM_Configuration;
*/
//bool LOAD_DEFAULT_CONFIG_DATA = true;
bool LOAD_DEFAULT_CONFIG_DATA = false;
Blynk_WM_Configuration defaultConfig =
{
//char header[16], dummy, not used
#if USE_SSL
"SSL",
#else
"NonSSL",
#endif
//WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS]
//WiFi_Creds.wifi_ssid and WiFi_Creds.wifi_pw
"SSID1", "password1",
"SSID2", "password2",
// Blynk_Credentials Blynk_Creds [NUM_BLYNK_CREDENTIALS];
// Blynk_Creds.blynk_server and Blynk_Creds.blynk_token
"account.ddns.net", "token",
"account.duckdns.org", "token1",
//int blynk_port;
#if USE_SSL
9443,
#else
8080,
#endif
//char board_name [24];
"Air-Control",
//int checkSum, dummy, not used
0
};
/////////// End Default Config Data /////////////
#endif //Credentials_h