Added support for reporting for freeHeap via MQTT.

This commit is contained in:
2019-05-30 13:09:38 +02:00
parent b6d59758d8
commit 5321409727
3 changed files with 16 additions and 0 deletions

View File

@ -69,3 +69,11 @@ void mqtt_loop() {
mqtt_client.loop();
}
}
void mqtt_publish(const char* topic, int number) {
char t[127];
sprintf(t, MQTT_TOPIC "%s", topic);
char b[32];
sprintf(b, "%d", number);
mqtt_client.publish(t, b);
}