just some reformatting - no code changes
This commit is contained in:
13
src/main.cpp
13
src/main.cpp
@@ -1,8 +1,8 @@
|
||||
#include <Arduino.h>
|
||||
#include <WiFiClient.h>
|
||||
#include <PubSubClient.h>
|
||||
#include <ESP8266WiFi.h>
|
||||
#include <ArduinoJson.h>
|
||||
#include <ESP8266WiFi.h>
|
||||
#include <PubSubClient.h>
|
||||
#include <WiFiClient.h>
|
||||
|
||||
const char* ssid = "JoNelsDarlings";
|
||||
const char* password = "Paris2016";
|
||||
@@ -17,7 +17,6 @@ boolean isOpen=false;
|
||||
char msg[MSG_BUFFER_SIZE];
|
||||
|
||||
void setup_wifi() {
|
||||
|
||||
delay(10);
|
||||
// We start by connecting to a WiFi network
|
||||
Serial.println();
|
||||
@@ -40,7 +39,6 @@ void setup_wifi() {
|
||||
Serial.println(WiFi.localIP());
|
||||
}
|
||||
|
||||
|
||||
void reconnect() {
|
||||
// Loop until we're reconnected
|
||||
while (!client.connected()) {
|
||||
@@ -83,7 +81,6 @@ void callback(char* topic, byte* payload, unsigned int length) {
|
||||
Serial.println(isOpen ? "CALLBACK: OPEN" : "CALLBACK: CLOSED");
|
||||
}
|
||||
|
||||
|
||||
void setup() {
|
||||
Serial.begin(9600);
|
||||
|
||||
@@ -103,7 +100,8 @@ void loop() {
|
||||
}
|
||||
client.loop();
|
||||
|
||||
// !!!! Funny enough - the meaning of the BuiltIn - LED is INVERTED, HIGH is off!!!
|
||||
// !!!! Funny enough - the meaning of the BuiltIn - LED is INVERTED, HIGH is
|
||||
// off!!!
|
||||
digitalWrite(LED_BUILTIN, HIGH);
|
||||
delay(400);
|
||||
|
||||
@@ -114,5 +112,4 @@ void loop() {
|
||||
} else {
|
||||
Serial.print("-");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user