Fix esp8266 example
This commit is contained in:
parent
341661671b
commit
35ead348e3
@ -38,14 +38,6 @@ long lastMsg = 0;
|
|||||||
char msg[50];
|
char msg[50];
|
||||||
int value = 0;
|
int value = 0;
|
||||||
|
|
||||||
void setup() {
|
|
||||||
pinMode(BUILTIN_LED, OUTPUT); // Initialize the BUILTIN_LED pin as an output
|
|
||||||
Serial.begin(115200);
|
|
||||||
setup_wifi();
|
|
||||||
client.setServer(mqtt_server, 1883);
|
|
||||||
client.setCallback(callback);
|
|
||||||
}
|
|
||||||
|
|
||||||
void setup_wifi() {
|
void setup_wifi() {
|
||||||
|
|
||||||
delay(10);
|
delay(10);
|
||||||
@ -107,6 +99,15 @@ void reconnect() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setup() {
|
||||||
|
pinMode(BUILTIN_LED, OUTPUT); // Initialize the BUILTIN_LED pin as an output
|
||||||
|
Serial.begin(115200);
|
||||||
|
setup_wifi();
|
||||||
|
client.setServer(mqtt_server, 1883);
|
||||||
|
client.setCallback(callback);
|
||||||
|
}
|
||||||
|
|
||||||
void loop() {
|
void loop() {
|
||||||
|
|
||||||
if (!client.connected()) {
|
if (!client.connected()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user