groshevsky
New member
Всем привет. Подключил ESP8266 к Arduino Nano, всё прошивается и работает. Но я не могу включить светодиод на 13-м пине Arduino через прошивку ESP8266 в среде Arduino IDE. Просто не работает
Код:
/*
ESP8266 Blink by Simon Peter
Blink the blue LED on the ESP-01 module
This example code is in the public domain
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 LED_BUILTIN to find the pin with the internal LED
*/
int led = 13;
void setup() {
pinMode(1, OUTPUT); // Initialize the LED_BUILTIN pin as an output
pinMode(led, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(1, LOW); // Turn the LED on (Note that LOW is the voltage level
digitalWrite(led, HIGH);
// but actually the LED is on; this is because
// it is active low on the ESP-01)
delay(1000); // Wait for a second
digitalWrite(1, HIGH); // Turn the LED off by making the voltage HIGH
digitalWrite(led, LOW);
delay(2000); // Wait for two seconds (to demonstrate the active low LED)
}