From 6e78cdf9e38462e4039dc80e750066fac8169c8e Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Wed, 21 Aug 2019 20:37:28 +0700 Subject: [PATCH] no message --- waterishos-gen2-mesh/waterishos-gen2-mesh.ino | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) 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) {