File tree 12 files changed +24
-8
lines changed
libraries/esp8266/examples
12 files changed +24
-8
lines changed Original file line number Diff line number Diff line change 6
6
The blue LED on the ESP-01 module is connected to GPIO1
7
7
(which is also the TXD pin; so we cannot use Serial.print() at the same time)
8
8
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
10
10
*/
11
11
12
12
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
14
14
}
15
15
16
16
// the loop function runs over and over again forever
17
17
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
19
19
// but actually the LED is on; this is because
20
20
// it is acive low on the ESP-01)
21
21
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
23
23
delay (2000 ); // Wait for two seconds (to demonstrate the active low LED)
24
24
}
Original file line number Diff line number Diff line change 7
7
The blue LED on the ESP-01 module is connected to GPIO1
8
8
(which is also the TXD pin; so we cannot use Serial.print() at the same time)
9
9
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
11
11
*/
12
12
13
13
int ledState = LOW;
@@ -16,7 +16,7 @@ unsigned long previousMillis = 0;
16
16
const long interval = 1000 ;
17
17
18
18
void setup () {
19
- pinMode (BUILTIN_LED , OUTPUT);
19
+ pinMode (LED_BUILTIN , OUTPUT);
20
20
}
21
21
22
22
void loop ()
@@ -28,6 +28,6 @@ void loop()
28
28
ledState = HIGH; // Note that this switches the LED *off*
29
29
else
30
30
ledState = LOW; // Note that this switches the LED *on*
31
- digitalWrite (BUILTIN_LED , ledState);
31
+ digitalWrite (LED_BUILTIN , ledState);
32
32
}
33
33
}
Original file line number Diff line number Diff line change @@ -41,6 +41,8 @@ static const uint8_t MOSI = 13;
41
41
static const uint8_t MISO = 12 ;
42
42
static const uint8_t SCK = 14 ;
43
43
44
+ static const uint8_t LED_BUILTIN = 16 ;
45
+
44
46
static const uint8_t BUILTIN_LED = 16 ;
45
47
46
48
static const uint8_t A0 = 17 ;
@@ -65,4 +67,4 @@ static const uint8_t A0 = 17;
65
67
#define SERIAL_PORT_HARDWARE Serial
66
68
#define SERIAL_PORT_HARDWARE_OPEN Serial
67
69
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;
42
42
static const uint8_t MISO = 12 ;
43
43
static const uint8_t SCK = 14 ;
44
44
45
+ static const uint8_t LED_BUILTIN = 0 ;
45
46
static const uint8_t BUILTIN_LED = 0 ;
46
47
47
48
static 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;
42
42
static const uint8_t MISO = 12 ;
43
43
static const uint8_t SCK = 14 ;
44
44
45
+ static const uint8_t LED_BUILTIN = 2 ;//new ESP-12E GPIO2
45
46
static const uint8_t BUILTIN_LED = 2 ;//new ESP-12E GPIO2
46
47
47
48
static 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;
42
42
static const uint8_t MISO = 12 ;
43
43
static const uint8_t SCK = 14 ;
44
44
45
+ static const uint8_t LED_BUILTIN = 2 ;
45
46
static const uint8_t BUILTIN_LED = 2 ;
46
47
47
48
static 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;
42
42
static const uint8_t MISO = 12 ;
43
43
static const uint8_t SCK = 14 ;
44
44
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
+
45
50
static const uint8_t BUILTIN_LED = 2 ;
46
51
static const uint8_t BUILTIN_LEDR = 2 ;
47
52
static 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;
43
43
static const uint8_t SCK = 14 ;
44
44
45
45
static const uint8_t BUILTIN_LED = 1 ;
46
+ static const uint8_t LED_BUILTIN = 1 ;
46
47
47
48
static const uint8_t A0 = 17 ;
48
49
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ static const uint8_t MOSI = 13;
42
42
static const uint8_t MISO = 12 ;
43
43
static const uint8_t SCK = 14 ;
44
44
45
+ static const uint8_t LED_BUILTIN = 16 ;
45
46
static const uint8_t BUILTIN_LED = 16 ;
46
47
47
48
static 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;
42
42
static const uint8_t MISO = 12 ;
43
43
static const uint8_t SCK = 14 ;
44
44
45
+ static const uint8_t LED_BUILTIN = 5 ;
46
+
45
47
static const uint8_t BUILTIN_LED = 5 ;
46
48
47
49
static const uint8_t A0 = 17 ;
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ static const uint8_t MOSI = 13;
47
47
static const uint8_t MISO = 12 ;
48
48
static const uint8_t SCK = 14 ;
49
49
50
+ static const uint8_t LED_BUILTIN = 12 ;
50
51
static const uint8_t BUILTIN_LED = 12 ;
51
52
52
53
static const uint8_t A0 = 17 ;
Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ static const uint8_t E14 = ESP_PINS_OFFSET + 14;
60
60
static const uint8_t E15 = ESP_PINS_OFFSET + 15 ;
61
61
static const uint8_t E16 = ESP_PINS_OFFSET + 16 ;
62
62
63
+ static const uint8_t LED_BUILTIN_LED = 2 ;
63
64
static const uint8_t BUILTIN_LED = 2 ;
64
65
65
66
#define SERIAL_PORT_MONITOR Serial
You can’t perform that action at this time.
0 commit comments