File tree Expand file tree Collapse file tree 12 files changed +24
-8
lines changed
libraries/esp8266/examples Expand file tree Collapse file tree 12 files changed +24
-8
lines changed Original file line number Diff line number Diff line change 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
1212void 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
1717void 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}
Original file line number Diff line number Diff line change 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
1313int ledState = LOW;
@@ -16,7 +16,7 @@ unsigned long previousMillis = 0;
1616const long interval = 1000 ;
1717
1818void setup () {
19- pinMode (BUILTIN_LED , OUTPUT);
19+ pinMode (LED_BUILTIN , OUTPUT);
2020}
2121
2222void 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}
Original file line number Diff line number Diff line change @@ -41,6 +41,8 @@ static const uint8_t MOSI = 13;
4141static const uint8_t MISO = 12 ;
4242static const uint8_t SCK = 14 ;
4343
44+ static const uint8_t LED_BUILTIN = 16 ;
45+
4446static const uint8_t BUILTIN_LED = 16 ;
4547
4648static 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 */
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ static const uint8_t MOSI = 13;
4242static const uint8_t MISO = 12 ;
4343static const uint8_t SCK = 14 ;
4444
45+ static const uint8_t LED_BUILTIN = 0 ;
4546static const uint8_t BUILTIN_LED = 0 ;
4647
4748static const uint8_t A0 = 17 ;
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ static const uint8_t MOSI = 13;
4242static const uint8_t MISO = 12 ;
4343static const uint8_t SCK = 14 ;
4444
45+ static const uint8_t LED_BUILTIN = 2 ;//new ESP-12E GPIO2
4546static const uint8_t BUILTIN_LED = 2 ;//new ESP-12E GPIO2
4647
4748static const uint8_t A0 = 17 ;
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ static const uint8_t MOSI = 13;
4242static const uint8_t MISO = 12 ;
4343static const uint8_t SCK = 14 ;
4444
45+ static const uint8_t LED_BUILTIN = 2 ;
4546static const uint8_t BUILTIN_LED = 2 ;
4647
4748static const uint8_t A0 = 17 ;
Original file line number Diff line number Diff line change @@ -42,6 +42,11 @@ static const uint8_t MOSI = 13;
4242static const uint8_t MISO = 12 ;
4343static 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+
4550static const uint8_t BUILTIN_LED = 2 ;
4651static const uint8_t BUILTIN_LEDR = 2 ;
4752static const uint8_t BUILTIN_LEDG = 4 ;
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ static const uint8_t MISO = 12;
4343static const uint8_t SCK = 14 ;
4444
4545static const uint8_t BUILTIN_LED = 1 ;
46+ static const uint8_t LED_BUILTIN = 1 ;
4647
4748static const uint8_t A0 = 17 ;
4849
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ static const uint8_t MOSI = 13;
4242static const uint8_t MISO = 12 ;
4343static const uint8_t SCK = 14 ;
4444
45+ static const uint8_t LED_BUILTIN = 16 ;
4546static const uint8_t BUILTIN_LED = 16 ;
4647
4748static const uint8_t A0 = 17 ;
Original file line number Diff line number Diff line change @@ -42,6 +42,8 @@ static const uint8_t MOSI = 13;
4242static const uint8_t MISO = 12 ;
4343static const uint8_t SCK = 14 ;
4444
45+ static const uint8_t LED_BUILTIN = 5 ;
46+
4547static const uint8_t BUILTIN_LED = 5 ;
4648
4749static const uint8_t A0 = 17 ;
You can’t perform that action at this time.
0 commit comments