Skip to content

Commit

Permalink
Test with CloudMQTT
Browse files Browse the repository at this point in the history
  • Loading branch information
botletics authored Jul 24, 2019
1 parent 9febdb7 commit fed6631
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Code/examples/SIM7000_MQTT_Demo/SIM7000_MQTT_Demo.ino
Original file line number Diff line number Diff line change
Expand Up @@ -282,11 +282,10 @@ void loop() {
if (!fona.MQTT_publish(TEMP_TOPIC, tempBuff, strlen(tempBuff), 1, 0)) Serial.println(F("Failed to publish!")); // Send temperature
if (!fona.MQTT_publish(BATT_TOPIC, battBuff, strlen(battBuff), 1, 0)) Serial.println(F("Failed to publish!")); // Send battery level

fona.MQTT_subscribe(SUB_TOPIC, 0); // Topic name, QoS
fona.MQTT_subscribe(SUB_TOPIC, 1); // Topic name, QoS

// Unsubscribe to topics if wanted:
// fona.MQTT_unsubscribe(GPS_TOPIC);
// fona.MQTT_unsubscribe(TEMP_TOPIC);
// fona.MQTT_unsubscribe(SUB_TOPIC);

// Enable MQTT data format to hex
// fona.MQTT_dataFormatHex(true); // Input "false" to reverse
Expand Down

0 comments on commit fed6631

Please sign in to comment.