Update WaterishOS-minimal2.0.ino
This commit is contained in:
parent
50341a513a
commit
16eb601571
|
@ -28,7 +28,6 @@
|
||||||
#include <Thread.h>
|
#include <Thread.h>
|
||||||
#include <ThreadController.h>
|
#include <ThreadController.h>
|
||||||
Adafruit_MCP23017 mcp;
|
Adafruit_MCP23017 mcp;
|
||||||
String MQTT_SERVER = "";
|
|
||||||
String ssid = "";
|
String ssid = "";
|
||||||
String password = "";
|
String password = "";
|
||||||
byte InteruptPinA=1;
|
byte InteruptPinA=1;
|
||||||
|
@ -37,7 +36,7 @@ byte arduinoInterrupt=1;
|
||||||
long tslr=0;
|
long tslr=0;
|
||||||
WiFiClient espClient;
|
WiFiClient espClient;
|
||||||
String nodename="devkit";
|
String nodename="devkit";
|
||||||
PubSubClient client(MQTT_SERVER, 1883, espClient);
|
PubSubClient client("siwatsystem.com", 1883, espClient);
|
||||||
PubSubClientTools mqtt(client);
|
PubSubClientTools mqtt(client);
|
||||||
ThreadController threadControl = ThreadController();
|
ThreadController threadControl = ThreadController();
|
||||||
Thread mqttupdater = Thread();
|
Thread mqttupdater = Thread();
|
||||||
|
@ -97,6 +96,7 @@ void setup(){
|
||||||
mqttupdater.onRun(updatemqtt);
|
mqttupdater.onRun(updatemqtt);
|
||||||
mqttupdater.setInterval(1000);
|
mqttupdater.setInterval(1000);
|
||||||
threadControl.add(&datacollector);
|
threadControl.add(&datacollector);
|
||||||
|
threadControl.add(&mqttupdater);
|
||||||
}
|
}
|
||||||
|
|
||||||
void loop(){
|
void loop(){
|
||||||
|
|
Loading…
Reference in New Issue