From 16eb601571571ef1ffb6a4fa281f83c57855a0c7 Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Fri, 9 Aug 2019 11:36:27 +0700 Subject: [PATCH] Update WaterishOS-minimal2.0.ino --- WaterishOS-minimal2.0/WaterishOS-minimal2.0.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WaterishOS-minimal2.0/WaterishOS-minimal2.0.ino b/WaterishOS-minimal2.0/WaterishOS-minimal2.0.ino index 38e93ed..34e7525 100644 --- a/WaterishOS-minimal2.0/WaterishOS-minimal2.0.ino +++ b/WaterishOS-minimal2.0/WaterishOS-minimal2.0.ino @@ -28,7 +28,6 @@ #include #include Adafruit_MCP23017 mcp; -String MQTT_SERVER = ""; String ssid = ""; String password = ""; byte InteruptPinA=1; @@ -37,7 +36,7 @@ byte arduinoInterrupt=1; long tslr=0; WiFiClient espClient; String nodename="devkit"; -PubSubClient client(MQTT_SERVER, 1883, espClient); +PubSubClient client("siwatsystem.com", 1883, espClient); PubSubClientTools mqtt(client); ThreadController threadControl = ThreadController(); Thread mqttupdater = Thread(); @@ -97,6 +96,7 @@ void setup(){ mqttupdater.onRun(updatemqtt); mqttupdater.setInterval(1000); threadControl.add(&datacollector); + threadControl.add(&mqttupdater); } void loop(){