on s'iniatialise avec les bonnes vars
This commit is contained in:
parent
fba88593ae
commit
482a8aef7e
@ -41,6 +41,18 @@ void setup()
|
|||||||
ledBlackAll();
|
ledBlackAll();
|
||||||
FastLED.setBrightness(brightness);
|
FastLED.setBrightness(brightness);
|
||||||
Serial.println("Ready");
|
Serial.println("Ready");
|
||||||
|
|
||||||
|
/* MQTT
|
||||||
|
* Il est important de faire un loop avant toute chose,
|
||||||
|
* afin de récupérer les valeurs provenant du broker mqtt
|
||||||
|
* et pas démarrer avec de vieilles infos.
|
||||||
|
*/
|
||||||
|
for (short int i = 0; i < 10; i++) {
|
||||||
|
delay(200);
|
||||||
|
client.loop();
|
||||||
|
}
|
||||||
|
|
||||||
|
Serial.println("End of setup");
|
||||||
}
|
}
|
||||||
|
|
||||||
// WIFI
|
// WIFI
|
||||||
@ -190,6 +202,7 @@ void ledFullColor()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void loop() {
|
void loop() {
|
||||||
|
Serial.print(".");
|
||||||
// MQTT
|
// MQTT
|
||||||
testConnectMQTT();
|
testConnectMQTT();
|
||||||
client.loop();
|
client.loop();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user