From a2a6cf456a14056f6f5cab619fbe799732f6a39b Mon Sep 17 00:00:00 2001 From: Dasun Theekshana Date: Sun, 10 Dec 2023 21:29:13 +0530 Subject: [PATCH] move credentials to separate file --- code/mqtt/ESP8266/.gitignore | 1 + code/mqtt/ESP8266/src/main.cpp | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/code/mqtt/ESP8266/.gitignore b/code/mqtt/ESP8266/.gitignore index 89cc49c..657a7a9 100644 --- a/code/mqtt/ESP8266/.gitignore +++ b/code/mqtt/ESP8266/.gitignore @@ -3,3 +3,4 @@ .vscode/c_cpp_properties.json .vscode/launch.json .vscode/ipch +lib/credentials.h diff --git a/code/mqtt/ESP8266/src/main.cpp b/code/mqtt/ESP8266/src/main.cpp index 11607ce..61668fa 100644 --- a/code/mqtt/ESP8266/src/main.cpp +++ b/code/mqtt/ESP8266/src/main.cpp @@ -1,13 +1,10 @@ #include #include +#include "../lib/credentials.h" -const char* SSID = "Dasun's Galaxy M21"; // WiFi name -const char* PASSWORD = "sise9444"; // WiFi password const char* ID = "nodemcu01"; // Device ID const char* TOPIC = "node/nodemcu01"; const char* NODESTATUS = "node/status"; -const char* mqttServer = "192.168.182.122"; // Broker IP -const int mqttPort = 1883; // Broker port int OB_LED = 16; // Assign LED1 to pin GPIO2 int MQTT_LED = 2; // Assign LED1 to pin GPIO16