just some reformatting - no code changes

This commit is contained in:
Joe Tretter
2022-07-05 14:18:19 -05:00
parent a53701139d
commit f3a4d9391e

View File

@@ -1,8 +1,8 @@
#include <Arduino.h> #include <Arduino.h>
#include <WiFiClient.h>
#include <PubSubClient.h>
#include <ESP8266WiFi.h>
#include <ArduinoJson.h> #include <ArduinoJson.h>
#include <ESP8266WiFi.h>
#include <PubSubClient.h>
#include <WiFiClient.h>
const char* ssid = "JoNelsDarlings"; const char* ssid = "JoNelsDarlings";
const char* password = "Paris2016"; const char* password = "Paris2016";
@@ -17,7 +17,6 @@ boolean isOpen=false;
char msg[MSG_BUFFER_SIZE]; char msg[MSG_BUFFER_SIZE];
void setup_wifi() { void setup_wifi() {
delay(10); delay(10);
// We start by connecting to a WiFi network // We start by connecting to a WiFi network
Serial.println(); Serial.println();
@@ -40,7 +39,6 @@ void setup_wifi() {
Serial.println(WiFi.localIP()); Serial.println(WiFi.localIP());
} }
void reconnect() { void reconnect() {
// Loop until we're reconnected // Loop until we're reconnected
while (!client.connected()) { while (!client.connected()) {
@@ -83,7 +81,6 @@ void callback(char* topic, byte* payload, unsigned int length) {
Serial.println(isOpen ? "CALLBACK: OPEN" : "CALLBACK: CLOSED"); Serial.println(isOpen ? "CALLBACK: OPEN" : "CALLBACK: CLOSED");
} }
void setup() { void setup() {
Serial.begin(9600); Serial.begin(9600);
@@ -103,7 +100,8 @@ void loop() {
} }
client.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); digitalWrite(LED_BUILTIN, HIGH);
delay(400); delay(400);
@@ -114,5 +112,4 @@ void loop() {
} else { } else {
Serial.print("-"); Serial.print("-");
} }
} }