diff --git a/.gitignore b/.gitignore index edbd925..65ca19e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -my_settings.h +my_secret.h \ No newline at end of file diff --git a/Blynk-PZEM-004T-v3.0/Blynk-PZEM-004T-v3.0.ino b/Blynk-PZEM-004T-v3.0/Blynk-PZEM-004T-v3.0.ino index f4c34fd..2e58e0e 100644 --- a/Blynk-PZEM-004T-v3.0/Blynk-PZEM-004T-v3.0.ino +++ b/Blynk-PZEM-004T-v3.0/Blynk-PZEM-004T-v3.0.ino @@ -16,8 +16,12 @@ */ -//#include "settings.h" //Make sure you UNCOMMENT this before you use. -#include "my_settings.h" //This is my personal settings. You can remove this line or comment-out when you are using. +//#define BLYNK_PRINT Serial // Uncomment for debugging + +#include "settings.h" +#include "secret.h" // <<--- UNCOMMENT this before you use and change values on config.h tab +//#include "my_secret.h" // <<--- COMMENT-OUT or REMOVE this line before you use. This is my personal settings. + #include #include diff --git a/Blynk-PZEM-004T-v3.0/secret.h b/Blynk-PZEM-004T-v3.0/secret.h new file mode 100644 index 0000000..2335016 --- /dev/null +++ b/Blynk-PZEM-004T-v3.0/secret.h @@ -0,0 +1,26 @@ +//////////////////////////////////////////////////////////// +// Secret Configuration // +////////////////////////////////////////////////////////// + + +/*************************************************** + Blynk Settings + **************************************************/ + +#define AUTH "Your Blynk Auth Token" // You should get Auth Token in the Blynk App. + +/*************************************************** + WiFi Settings + **************************************************/ + +#define WIFI_SSID "Your WiFi Network Name" +#define WIFI_PASS "Your Wifi Password" + +/*************************************************** + Server Settings + **************************************************/ + +#define USE_LOCAL_SERVER // Comment-out if use Blynk hosted cloud service +#define SERVER "xxx.xxx.xx.xxx" // Comment-out if use Blynk hosted cloud service + +#define PORT 8080 diff --git a/Blynk-PZEM-004T-v3.0/settings.h b/Blynk-PZEM-004T-v3.0/settings.h index fe10fa5..b09b275 100644 --- a/Blynk-PZEM-004T-v3.0/settings.h +++ b/Blynk-PZEM-004T-v3.0/settings.h @@ -16,31 +16,8 @@ #define vPIN_POWER_FACTOR V5 #define vPIN_OVER_POWER_ALARM V6 - -/*************************************************** - * Blynk Settings - **************************************************/ - -#define AUTH "Your Blynk Auth Token" //You should get Auth Token in the Blynk App. - - -/*************************************************** - * WiFi Settings - **************************************************/ - -#define WIFI_SSID "Your WiFi Network Name" -#define WIFI_PASS "Your Wifi Password" - /*************************************************** * Server Settings **************************************************/ #define OTA_HOSTNAME "PZEM-004v3" - - -// Remove/comment-out below 2 lines when use Blynk hosted server - -#define USE_LOCAL_SERVER //Use local Blynk Server - comment-out if use Blynk hosted cloud service -#define SERVER "xxx.xxx.xx.xxx" //comment-out if use Blynk hosted cloud service - -#define PORT 8080