Skip to content

Commit 573a0fb

Browse files
tuxedo0801igrr
authored andcommitted
Add LED_BUILTIN definition (#1556)
keep arduino incompatible BUILTIN_LED (+22 squashed commits) [e124f9c] keep arduino incompatible BUILTIN_LED [18dab66] keep arduino incompatible BUILTIN_LED [0095de6] keep arduino incompatible BUILTIN_LED [cca2714] keep arduino incompatible BUILTIN_LED [ff62bfb] keep arduino incompatible BUILTIN_LED [fd6f7c0] keep arduino incompatible BUILTIN_LED [220b02a] keep arduino incompatible BUILTIN_LED [b871b1b] keep arduino incompatible BUILTIN_LED [1d97cac] keep arduino incompatible BUILTIN_LED [ebc2667] changed BUILTIN_LED to LED_BUILTIN [7008a27] changed BUILTIN_LED to LED_BUILTIN [cf3f6da] changed BUILTIN_LED to LED_BUILTIN [5e11c43] changed BUILTIN_LED to LED_BUILTIN [8645bd5] changed BUILTIN_LED to LED_BUILTIN [faae742] changed BUILTIN_LED to LED_BUILTIN [df2659b] changed BUILTIN_LED to LED_BUILTIN [1eb74d5] changed BUILTIN_LED to LED_BUILTIN [fb9e977] changed BUILTIN_LED to LED_BUILTIN [b735737] changed BUILTIN_LED to LED_BUILTIN [d0557dd] changed BUILTIN_LED to LED_BUILTIN [a25e4aa] changed BUILTIN_LED to LED_BUILTIN [7865ace] changed BUILTIN_LED to LED_BUILTIN
1 parent 5e8be46 commit 573a0fb

File tree

12 files changed

+24
-8
lines changed

12 files changed

+24
-8
lines changed

libraries/esp8266/examples/Blink/Blink.ino

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@
66
The blue LED on the ESP-01 module is connected to GPIO1
77
(which is also the TXD pin; so we cannot use Serial.print() at the same time)
88
9-
Note that this sketch uses BUILTIN_LED to find the pin with the internal LED
9+
Note that this sketch uses LED_BUILTIN to find the pin with the internal LED
1010
*/
1111

1212
void setup() {
13-
pinMode(BUILTIN_LED, OUTPUT); // Initialize the BUILTIN_LED pin as an output
13+
pinMode(LED_BUILTIN, OUTPUT); // Initialize the LED_BUILTIN pin as an output
1414
}
1515

1616
// the loop function runs over and over again forever
1717
void loop() {
18-
digitalWrite(BUILTIN_LED, LOW); // Turn the LED on (Note that LOW is the voltage level
18+
digitalWrite(LED_BUILTIN, LOW); // Turn the LED on (Note that LOW is the voltage level
1919
// but actually the LED is on; this is because
2020
// it is acive low on the ESP-01)
2121
delay(1000); // Wait for a second
22-
digitalWrite(BUILTIN_LED, HIGH); // Turn the LED off by making the voltage HIGH
22+
digitalWrite(LED_BUILTIN, HIGH); // Turn the LED off by making the voltage HIGH
2323
delay(2000); // Wait for two seconds (to demonstrate the active low LED)
2424
}

libraries/esp8266/examples/BlinkWithoutDelay/BlinkWithoutDelay.ino

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
The blue LED on the ESP-01 module is connected to GPIO1
88
(which is also the TXD pin; so we cannot use Serial.print() at the same time)
99
10-
Note that this sketch uses BUILTIN_LED to find the pin with the internal LED
10+
Note that this sketch uses LED_BUILTIN to find the pin with the internal LED
1111
*/
1212

1313
int ledState = LOW;
@@ -16,7 +16,7 @@ unsigned long previousMillis = 0;
1616
const long interval = 1000;
1717

1818
void setup() {
19-
pinMode(BUILTIN_LED, OUTPUT);
19+
pinMode(LED_BUILTIN, OUTPUT);
2020
}
2121

2222
void loop()
@@ -28,6 +28,6 @@ void loop()
2828
ledState = HIGH; // Note that this switches the LED *off*
2929
else
3030
ledState = LOW; // Note that this switches the LED *on*
31-
digitalWrite(BUILTIN_LED, ledState);
31+
digitalWrite(LED_BUILTIN, ledState);
3232
}
3333
}

variants/ESPDuino/pins_arduino.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ static const uint8_t MOSI = 13;
4141
static const uint8_t MISO = 12;
4242
static const uint8_t SCK = 14;
4343

44+
static const uint8_t LED_BUILTIN = 16;
45+
4446
static const uint8_t BUILTIN_LED = 16;
4547

4648
static const uint8_t A0 = 17;
@@ -65,4 +67,4 @@ static const uint8_t A0 = 17;
6567
#define SERIAL_PORT_HARDWARE Serial
6668
#define SERIAL_PORT_HARDWARE_OPEN Serial
6769

68-
#endif /* Pins_Arduino_h */
70+
#endif /* Pins_Arduino_h */

variants/adafruit/pins_arduino.h

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ static const uint8_t MOSI = 13;
4242
static const uint8_t MISO = 12;
4343
static const uint8_t SCK = 14;
4444

45+
static const uint8_t LED_BUILTIN = 0;
4546
static const uint8_t BUILTIN_LED = 0;
4647

4748
static const uint8_t A0 = 17;

variants/d1/pins_arduino.h

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ static const uint8_t MOSI = 13;
4242
static const uint8_t MISO = 12;
4343
static const uint8_t SCK = 14;
4444

45+
static const uint8_t LED_BUILTIN = 2;//new ESP-12E GPIO2
4546
static const uint8_t BUILTIN_LED = 2;//new ESP-12E GPIO2
4647

4748
static const uint8_t A0 = 17;

variants/d1_mini/pins_arduino.h

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ static const uint8_t MOSI = 13;
4242
static const uint8_t MISO = 12;
4343
static const uint8_t SCK = 14;
4444

45+
static const uint8_t LED_BUILTIN = 2;
4546
static const uint8_t BUILTIN_LED = 2;
4647

4748
static const uint8_t A0 = 17;

variants/espino/pins_arduino.h

+5
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ static const uint8_t MOSI = 13;
4242
static const uint8_t MISO = 12;
4343
static const uint8_t SCK = 14;
4444

45+
static const uint8_t LED_BUILTIN = 2;
46+
static const uint8_t LED_BUILTIN_R = 2;
47+
static const uint8_t LED_BUILTIN_G = 4;
48+
static const uint8_t LED_BUILTIN_B = 5;
49+
4550
static const uint8_t BUILTIN_LED = 2;
4651
static const uint8_t BUILTIN_LEDR = 2;
4752
static const uint8_t BUILTIN_LEDG = 4;

variants/generic/pins_arduino.h

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ static const uint8_t MISO = 12;
4343
static const uint8_t SCK = 14;
4444

4545
static const uint8_t BUILTIN_LED = 1;
46+
static const uint8_t LED_BUILTIN = 1;
4647

4748
static const uint8_t A0 = 17;
4849

variants/nodemcu/pins_arduino.h

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ static const uint8_t MOSI = 13;
4242
static const uint8_t MISO = 12;
4343
static const uint8_t SCK = 14;
4444

45+
static const uint8_t LED_BUILTIN = 16;
4546
static const uint8_t BUILTIN_LED = 16;
4647

4748
static const uint8_t A0 = 17;

variants/thing/pins_arduino.h

+2
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ static const uint8_t MOSI = 13;
4242
static const uint8_t MISO = 12;
4343
static const uint8_t SCK = 14;
4444

45+
static const uint8_t LED_BUILTIN = 5;
46+
4547
static const uint8_t BUILTIN_LED = 5;
4648

4749
static const uint8_t A0 = 17;

variants/wifinfo/pins_arduino.h

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ static const uint8_t MOSI = 13;
4747
static const uint8_t MISO = 12;
4848
static const uint8_t SCK = 14;
4949

50+
static const uint8_t LED_BUILTIN = 12;
5051
static const uint8_t BUILTIN_LED = 12;
5152

5253
static const uint8_t A0 = 17;

variants/wifio/pins_arduino.h

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ static const uint8_t E14 = ESP_PINS_OFFSET + 14;
6060
static const uint8_t E15 = ESP_PINS_OFFSET + 15;
6161
static const uint8_t E16 = ESP_PINS_OFFSET + 16;
6262

63+
static const uint8_t LED_BUILTIN_LED = 2;
6364
static const uint8_t BUILTIN_LED = 2;
6465

6566
#define SERIAL_PORT_MONITOR Serial

0 commit comments

Comments
 (0)