|
|
|
@ -153,11 +153,9 @@ void ledCylon() |
|
|
|
{ |
|
|
|
// Effet cylon : on allume une led, on attends, on eteinds, on passe à la suivante
|
|
|
|
for(int i = 0; i < LED_NUM; i++) { |
|
|
|
EVERY_N_SECONDS(1) { |
|
|
|
client.loop(); |
|
|
|
if (ledEffect != LED_EFFECT_CYLON) { |
|
|
|
return; |
|
|
|
} |
|
|
|
client.loop(); |
|
|
|
if (ledEffect != LED_EFFECT_CYLON) { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
leds[i] = color; |
|
|
|
@ -167,11 +165,9 @@ void ledCylon() |
|
|
|
} |
|
|
|
|
|
|
|
for(int i = LED_NUM - 1; i > 0; i--) { |
|
|
|
EVERY_N_SECONDS(1) { |
|
|
|
client.loop(); |
|
|
|
if (ledEffect != LED_EFFECT_CYLON) { |
|
|
|
return; |
|
|
|
} |
|
|
|
client.loop(); |
|
|
|
if (ledEffect != LED_EFFECT_CYLON) { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
leds[i] = color; |
|
|
|
@ -202,7 +198,6 @@ void ledFullColor() |
|
|
|
} |
|
|
|
|
|
|
|
void loop() { |
|
|
|
Serial.print("."); |
|
|
|
// MQTT
|
|
|
|
testConnectMQTT(); |
|
|
|
client.loop(); |
|
|
|
|