Skip to content

PR for issue #1555: change BUILTIN_LED to LED_BUILTIN #1556

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 25 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
7865ace
changed BUILTIN_LED to LED_BUILTIN
tuxedo0801 Feb 2, 2016
a25e4aa
changed BUILTIN_LED to LED_BUILTIN
tuxedo0801 Feb 2, 2016
d0557dd
changed BUILTIN_LED to LED_BUILTIN
tuxedo0801 Feb 2, 2016
b735737
changed BUILTIN_LED to LED_BUILTIN
tuxedo0801 Feb 2, 2016
fb9e977
changed BUILTIN_LED to LED_BUILTIN
tuxedo0801 Feb 2, 2016
1eb74d5
changed BUILTIN_LED to LED_BUILTIN
tuxedo0801 Feb 2, 2016
df2659b
changed BUILTIN_LED to LED_BUILTIN
tuxedo0801 Feb 2, 2016
faae742
changed BUILTIN_LED to LED_BUILTIN
tuxedo0801 Feb 2, 2016
8645bd5
changed BUILTIN_LED to LED_BUILTIN
tuxedo0801 Feb 2, 2016
5e11c43
changed BUILTIN_LED to LED_BUILTIN
tuxedo0801 Feb 2, 2016
cf3f6da
changed BUILTIN_LED to LED_BUILTIN
tuxedo0801 Feb 2, 2016
7008a27
changed BUILTIN_LED to LED_BUILTIN
tuxedo0801 Feb 2, 2016
ebc2667
changed BUILTIN_LED to LED_BUILTIN
tuxedo0801 Feb 2, 2016
292cf28
Merge branch 'master' into pr_issue_1555
tuxedo0801 Feb 2, 2016
1d97cac
keep arduino incompatible BUILTIN_LED
tuxedo0801 Feb 3, 2016
b871b1b
keep arduino incompatible BUILTIN_LED
tuxedo0801 Feb 3, 2016
220b02a
keep arduino incompatible BUILTIN_LED
tuxedo0801 Feb 3, 2016
fd6f7c0
keep arduino incompatible BUILTIN_LED
tuxedo0801 Feb 3, 2016
ff62bfb
keep arduino incompatible BUILTIN_LED
tuxedo0801 Feb 3, 2016
cca2714
keep arduino incompatible BUILTIN_LED
tuxedo0801 Feb 3, 2016
0095de6
keep arduino incompatible BUILTIN_LED
tuxedo0801 Feb 3, 2016
18dab66
keep arduino incompatible BUILTIN_LED
tuxedo0801 Feb 3, 2016
e124f9c
keep arduino incompatible BUILTIN_LED
tuxedo0801 Feb 3, 2016
0c5a8a4
keep arduino incompatible BUILTIN_LED
tuxedo0801 Feb 3, 2016
d758244
Merge branch 'master' into pr_issue_1555
tuxedo0801 Feb 3, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions libraries/esp8266/examples/Blink/Blink.ino
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
The blue LED on the ESP-01 module is connected to GPIO1
(which is also the TXD pin; so we cannot use Serial.print() at the same time)

Note that this sketch uses BUILTIN_LED to find the pin with the internal LED
Note that this sketch uses LED_BUILTIN to find the pin with the internal LED
*/

void setup() {
pinMode(BUILTIN_LED, OUTPUT); // Initialize the BUILTIN_LED pin as an output
pinMode(LED_BUILTIN, OUTPUT); // Initialize the LED_BUILTIN pin as an output
}

// the loop function runs over and over again forever
void loop() {
digitalWrite(BUILTIN_LED, LOW); // Turn the LED on (Note that LOW is the voltage level
digitalWrite(LED_BUILTIN, LOW); // Turn the LED on (Note that LOW is the voltage level
// but actually the LED is on; this is because
// it is acive low on the ESP-01)
delay(1000); // Wait for a second
digitalWrite(BUILTIN_LED, HIGH); // Turn the LED off by making the voltage HIGH
digitalWrite(LED_BUILTIN, HIGH); // Turn the LED off by making the voltage HIGH
delay(2000); // Wait for two seconds (to demonstrate the active low LED)
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
The blue LED on the ESP-01 module is connected to GPIO1
(which is also the TXD pin; so we cannot use Serial.print() at the same time)

Note that this sketch uses BUILTIN_LED to find the pin with the internal LED
Note that this sketch uses LED_BUILTIN to find the pin with the internal LED
*/

int ledState = LOW;
Expand All @@ -16,7 +16,7 @@ unsigned long previousMillis = 0;
const long interval = 1000;

void setup() {
pinMode(BUILTIN_LED, OUTPUT);
pinMode(LED_BUILTIN, OUTPUT);
}

void loop()
Expand All @@ -28,6 +28,6 @@ void loop()
ledState = HIGH; // Note that this switches the LED *off*
else
ledState = LOW; // Note that this switches the LED *on*
digitalWrite(BUILTIN_LED, ledState);
digitalWrite(LED_BUILTIN, ledState);
}
}
4 changes: 3 additions & 1 deletion variants/ESPDuino/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ static const uint8_t MOSI = 13;
static const uint8_t MISO = 12;
static const uint8_t SCK = 14;

static const uint8_t LED_BUILTIN = 16;

static const uint8_t BUILTIN_LED = 16;

static const uint8_t A0 = 17;
Expand All @@ -65,4 +67,4 @@ static const uint8_t A0 = 17;
#define SERIAL_PORT_HARDWARE Serial
#define SERIAL_PORT_HARDWARE_OPEN Serial

#endif /* Pins_Arduino_h */
#endif /* Pins_Arduino_h */
1 change: 1 addition & 0 deletions variants/adafruit/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ static const uint8_t MOSI = 13;
static const uint8_t MISO = 12;
static const uint8_t SCK = 14;

static const uint8_t LED_BUILTIN = 0;
static const uint8_t BUILTIN_LED = 0;

static const uint8_t A0 = 17;
Expand Down
1 change: 1 addition & 0 deletions variants/d1/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ static const uint8_t MOSI = 13;
static const uint8_t MISO = 12;
static const uint8_t SCK = 14;

static const uint8_t LED_BUILTIN = 2;//new ESP-12E GPIO2
static const uint8_t BUILTIN_LED = 2;//new ESP-12E GPIO2

static const uint8_t A0 = 17;
Expand Down
1 change: 1 addition & 0 deletions variants/d1_mini/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ static const uint8_t MOSI = 13;
static const uint8_t MISO = 12;
static const uint8_t SCK = 14;

static const uint8_t LED_BUILTIN = 2;
static const uint8_t BUILTIN_LED = 2;

static const uint8_t A0 = 17;
Expand Down
5 changes: 5 additions & 0 deletions variants/espino/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ static const uint8_t MOSI = 13;
static const uint8_t MISO = 12;
static const uint8_t SCK = 14;

static const uint8_t LED_BUILTIN = 2;
static const uint8_t LED_BUILTIN_R = 2;
static const uint8_t LED_BUILTIN_G = 4;
static const uint8_t LED_BUILTIN_B = 5;

static const uint8_t BUILTIN_LED = 2;
static const uint8_t BUILTIN_LEDR = 2;
static const uint8_t BUILTIN_LEDG = 4;
Expand Down
1 change: 1 addition & 0 deletions variants/generic/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ static const uint8_t MISO = 12;
static const uint8_t SCK = 14;

static const uint8_t BUILTIN_LED = 1;
static const uint8_t LED_BUILTIN = 1;

static const uint8_t A0 = 17;

Expand Down
1 change: 1 addition & 0 deletions variants/nodemcu/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ static const uint8_t MOSI = 13;
static const uint8_t MISO = 12;
static const uint8_t SCK = 14;

static const uint8_t LED_BUILTIN = 16;
static const uint8_t BUILTIN_LED = 16;

static const uint8_t A0 = 17;
Expand Down
2 changes: 2 additions & 0 deletions variants/thing/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ static const uint8_t MOSI = 13;
static const uint8_t MISO = 12;
static const uint8_t SCK = 14;

static const uint8_t LED_BUILTIN = 5;

static const uint8_t BUILTIN_LED = 5;

static const uint8_t A0 = 17;
Expand Down
1 change: 1 addition & 0 deletions variants/wifinfo/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ static const uint8_t MOSI = 13;
static const uint8_t MISO = 12;
static const uint8_t SCK = 14;

static const uint8_t LED_BUILTIN = 12;
static const uint8_t BUILTIN_LED = 12;

static const uint8_t A0 = 17;
Expand Down
1 change: 1 addition & 0 deletions variants/wifio/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ static const uint8_t E14 = ESP_PINS_OFFSET + 14;
static const uint8_t E15 = ESP_PINS_OFFSET + 15;
static const uint8_t E16 = ESP_PINS_OFFSET + 16;

static const uint8_t LED_BUILTIN_LED = 2;
static const uint8_t BUILTIN_LED = 2;

#define SERIAL_PORT_MONITOR Serial
Expand Down