Skip to content

Commit a154404

Browse files
committed
Improvement connected with LED blinking
1 parent 833ca12 commit a154404

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

examples/4_Simple_command/4_Simple_command.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ unsigned long lastMessageTime = 0; // stores the time when last data message w
2121
void blinkLED5times(const String arguments, String &response) {
2222
pinMode(LED_BUILTIN, OUTPUT);
2323
for (byte i = 0; i < 5; i++) {
24-
digitalWrite(LED_BUILTIN, HIGH);
25-
delay(250);
2624
digitalWrite(LED_BUILTIN, LOW);
2725
delay(250);
26+
digitalWrite(LED_BUILTIN, HIGH);
27+
delay(250);
2828
}
2929
response = "{\"blinked\":\"5 times\"}";
3030
}

examples/5_Command_with_arguments/5_Command_with_arguments.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ void blinkLED(const String arguments, String &response) {
3535

3636
pinMode(LED_BUILTIN, OUTPUT);
3737
for (byte i = 0; i < reps; i++) {
38-
digitalWrite(LED_BUILTIN, HIGH);
39-
delay(timeOn);
4038
digitalWrite(LED_BUILTIN, LOW);
39+
delay(timeOn);
40+
digitalWrite(LED_BUILTIN, HIGH);
4141
delay(timeOff);
4242
}
4343

0 commit comments

Comments
 (0)