Skip to content

Commit 833ca12

Browse files
committed
Typo correction
1 parent 3e7e648 commit 833ca12

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/5_Command_with_arguments/5_Command_with_arguments.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ void blinkLED(const String arguments, String &response) {
3131
int timeOn = incomingArguments["time ON"]; // arguments are now accessible using their name
3232
int timeOff = incomingArguments["time OFF"];
3333
int reps = incomingArguments["repetitions"];
34-
unsigned long elaspedTime = millis(); // will keep track of time in order to compute the animation duration
34+
unsigned long elapsedTime = millis(); // will keep track of time in order to compute the animation duration
3535

3636
pinMode(LED_BUILTIN, OUTPUT);
3737
for (byte i = 0; i < reps; i++) {
@@ -41,10 +41,10 @@ void blinkLED(const String arguments, String &response) {
4141
delay(timeOff);
4242
}
4343

44-
elaspedTime = millis() - elaspedTime;
44+
elapsedTime = millis() - elapsedTime;
4545

4646
StaticJsonDocument<128> outgoingResponse; // creation of a JSON document that will hold the response
47-
outgoingResponse["animation duration (milliseconds)"] = elaspedTime; // adding reponse item (you can add several by repeating the line):
47+
outgoingResponse["animation duration (milliseconds)"] = elapsedTime; // adding reponse item (you can add several by repeating the line):
4848
serializeJson(outgoingResponse, response); // exporting JSON in 'reponse' String
4949
// example of 'response' content: "{\"animation duration (milliseconds)\":5000}"
5050
}

0 commit comments

Comments
 (0)