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