Skip to content

Commit 870d435

Browse files
committed
delete subscription feature
1 parent df48ab4 commit 870d435

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/main.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#define DEBUG true
1717

1818
const int MQTT_PORT = 8883;
19-
const char MQTT_SUB_TOPIC[] = "$aws/things/" THINGNAME "/shadow/sub";
2019
const char MQTT_PUB_TOPIC[] = "$aws/things/" THINGNAME "/shadow/pub";
2120

2221
uint8_t DST = 0;
@@ -93,14 +92,11 @@ void connectToMqtt()
9392
if (client.connect(THINGNAME)) {
9493
Serial.println("connected!");
9594
sendDataToUno("connected! \r\n", 1000, DEBUG);
96-
if (!client.subscribe(MQTT_SUB_TOPIC)) {
97-
Serial.println(client.state());
98-
}
9995
} else {
10096
Serial.print("failed, reason -> ");
10197
Serial.println(client.state());
102-
Serial.println(" < try again in 5 seconds");
103-
delay(5000);
98+
Serial.println(" < try again in 5 seconds");
99+
delay(5000);
104100
}
105101
}
106102
}

0 commit comments

Comments
 (0)