Refactor MQTT and WiFi credentials to separate header files
This commit is contained in:
@@ -4,6 +4,9 @@
|
||||
#include <WiFi.h>
|
||||
#include <PubSubClient.h>
|
||||
|
||||
#define USER "contaminus"
|
||||
#define MQTT_PASSWORD "contaminus"
|
||||
|
||||
void MQTT_OnReceived(char *topic, byte *payload, unsigned int length);
|
||||
void MQTT_Init(const char *MQTTServerAddress, uint16_t MQTTServerPort);
|
||||
void MQTT_Connect(const char *MQTTClientName);
|
||||
|
||||
@@ -3,4 +3,7 @@
|
||||
#include <WiFi.h>
|
||||
#include <PubSubClient.h>
|
||||
|
||||
#define SSID "DIGIFIBRA-D2ys"
|
||||
#define WIFI_PASSWORD "4EEATsyTcZ"
|
||||
|
||||
int setupWifi();
|
||||
@@ -5,12 +5,6 @@
|
||||
#define REST_PORT 443
|
||||
#define MQTT_PORT 1883
|
||||
|
||||
#define USER "contaminus"
|
||||
#define MQTT_PASSWORD "contaminus"
|
||||
|
||||
#define SSID "DIGIFIBRA-D2ys"
|
||||
#define WIFI_PASSWORD "4EEATsyTcZ"
|
||||
|
||||
#define MQ7_ID 3
|
||||
#define BME280_ID 2
|
||||
#define GPS_ID 1
|
||||
|
||||
@@ -45,7 +45,7 @@ void loop()
|
||||
{
|
||||
uint32_t now = millis();
|
||||
|
||||
/*if (now - matrixTimer.lastRun >= matrixTimer.interval)
|
||||
if (now - matrixTimer.lastRun >= matrixTimer.interval)
|
||||
{
|
||||
if (MAX7219_Animate())
|
||||
{
|
||||
@@ -67,7 +67,7 @@ void loop()
|
||||
sendSensorData();
|
||||
|
||||
globalTimer.lastRun = now;
|
||||
}*/
|
||||
}
|
||||
|
||||
if (now - mqttTimer.lastRun >= mqttTimer.interval)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user