From 7e3f548192aeb266fffe0d31b999411baaa8874e Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Wed, 10 Jul 2019 18:20:58 +0200 Subject: [PATCH] Gitignore for config, password changed --- .gitignore | 1 + config.template.h | 16 ++++++++++++++++ energy-meter.ino | 18 +----------------- 3 files changed, 18 insertions(+), 17 deletions(-) create mode 100644 .gitignore create mode 100644 config.template.h diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..299bb98 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +config.h \ No newline at end of file diff --git a/config.template.h b/config.template.h new file mode 100644 index 0000000..c3466be --- /dev/null +++ b/config.template.h @@ -0,0 +1,16 @@ +/** + * Configuration template file, copy it to config.h + * and make your changes there. + */ +#define DB_HOST "db.verdnatura.es" +#define DB_USER "energy-meter" +#define DB_PASS "" +#define DB_PORT 3306 +#define SQL "CALL vn.energyMeter_record(%d, %d)" +#define DELAY 100 +#define DEBUG_INTERVAL 1000 +#define RECORD_INTERVAL 60000 +#define N_INPUTS 9 + +int pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9}; +byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED}; diff --git a/energy-meter.ino b/energy-meter.ino index 5f00f82..9059c77 100644 --- a/energy-meter.ino +++ b/energy-meter.ino @@ -5,23 +5,7 @@ #include #include #include - -//+++++++++++++++++++++++++++++++++++++++++++ Configuration - -#define DB_HOST "db.verdnatura.es" -#define DB_USER "energy-meter" -#define DB_PASS "UeNBY2wR3gxMd34A" -#define DB_PORT 3306 -#define DELAY 100 -#define DEBUG_INTERVAL 1000 -#define RECORD_INTERVAL 60000 -#define SQL "CALL vn.energyMeter_record(%d, %d)" -#define N_INPUTS 9 - -int pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9}; -byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED}; - -//+++++++++++++++++++++++++++++++++++++++++++ Code +#include "config.h" typedef struct Input { int id;