File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change 1616#define DEBUG true
1717
1818const int MQTT_PORT = 8883 ;
19- const char MQTT_SUB_TOPIC[] = " $aws/things/" THINGNAME " /shadow/sub" ;
2019const char MQTT_PUB_TOPIC[] = " $aws/things/" THINGNAME " /shadow/pub" ;
2120
2221uint8_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}
You can’t perform that action at this time.
0 commit comments