Skip to content
This repository has been archived by the owner on Jan 28, 2025. It is now read-only.

Commit

Permalink
changed file structure
Browse files Browse the repository at this point in the history
  • Loading branch information
pkarun committed Oct 7, 2019
1 parent 258ef17 commit f7eccbd
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
my_settings.h
my_secret.h
8 changes: 6 additions & 2 deletions Blynk-PZEM-004T-v3.0/Blynk-PZEM-004T-v3.0.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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 <ArduinoOTA.h>
#include <BlynkSimpleEsp8266.h>
Expand Down
26 changes: 26 additions & 0 deletions Blynk-PZEM-004T-v3.0/secret.h
Original file line number Diff line number Diff line change
@@ -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
23 changes: 0 additions & 23 deletions Blynk-PZEM-004T-v3.0/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit f7eccbd

Please sign in to comment.