mirror of
https://github.com/gabrielkheisa/antares-esp8266-mqtt.git
synced 2025-08-21 11:31:09 +00:00
Added subscribe functionality
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user