diff --git a/waterishos-gen2-mesh/waterishos-gen2-mesh.ino b/waterishos-gen2-mesh/waterishos-gen2-mesh.ino index 5287242..c834b41 100644 --- a/waterishos-gen2-mesh/waterishos-gen2-mesh.ino +++ b/waterishos-gen2-mesh/waterishos-gen2-mesh.ino @@ -50,12 +50,9 @@ void setup() { void loop() { - if (! mesh.connected())return; - unsigned long currentMillis = millis(); - if (currentMillis - previousMillis >= interval) { - mesh.publish("/test","test"); - previousMillis = currentMillis; - cnt++; + if (! mesh.connected()){ + Serial.print("Mesh Disconnected"); + return; } } void callback(const char *topic, const char *msg) {