Skip to content

Commit f72af51

Browse files
authored
Merge pull request #190 from arduino-libraries/led-builtin-pin
Replace hard-coded LED pin number with the portable LED_BUILTIN constant
2 parents 0a8d878 + 5fabf52 commit f72af51

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/SimpleWebServerWiFi/SimpleWebServerWiFi.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@ void loop() {
101101

102102
// Check to see if the client request was "GET /H" or "GET /L":
103103
if (currentLine.endsWith("GET /H")) {
104-
digitalWrite(9, HIGH); // GET /H turns the LED on
104+
digitalWrite(LED_BUILTIN, HIGH); // GET /H turns the LED on
105105
}
106106
if (currentLine.endsWith("GET /L")) {
107-
digitalWrite(9, LOW); // GET /L turns the LED off
107+
digitalWrite(LED_BUILTIN, LOW); // GET /L turns the LED off
108108
}
109109
}
110110
}

0 commit comments

Comments
 (0)