Added subscribe functionality

This commit is contained in:
vmasdani
2019-01-17 14:35:24 +07:00
parent dd4ad8bde6
commit 37e82f2ace
85 changed files with 5366 additions and 7 deletions

View File

@@ -10,11 +10,18 @@
AntaresESP8266MQTT antares(ACCESSKEY);
void setup() {
Serial.begin(115200);
antares.setDebug(true);
antares.wifiConnection(WIFISSID, PASSWORD);
antares.setMqttServer();
Serial.begin(115200);
antares.setDebug(true);
antares.wifiConnection(WIFISSID, PASSWORD);
antares.setMqttServer();
}
void loop() {
antares.checkMqttConnection();
antares.checkMqttConnection();
antares.add("temperature", 30);
antares.add("humidity", 75);
antares.add("message", "Hello World!");
antares.add("temperature", 45);
antares.publish(projectName, deviceName);
delay(5000);
}