Problem with ESP8266-01 GPIO pins
Posted: Thu Mar 16, 2017 12:12 pm
Greetings to all ... I will be new with the ESP8266 and not too long update the firmware of the same to be able to program it with the IDE Arduino, to start I decided to make the example of blinking of the LED, making use of the pin GPIO2, the problem that I have Is that once the program has been re-started the ESP with the led connected to the output pin, but the LED only stays on all the time, and for more than restarting the ESP again and again, the led is only on. But if I take the LED off and restart the ESP and then turn on the led again, the program is working correctly, and the LED starts blinking.
Please can anyone help me with this little problem, and can you tell me what's going on? first of all, Thanks
P.S: I have connected a resistance of 330 ohms as protection to the output of the GPIO2 together with the led. And I leave the small code attached
Please can anyone help me with this little problem, and can you tell me what's going on? first of all, Thanks
P.S: I have connected a resistance of 330 ohms as protection to the output of the GPIO2 together with the led. And I leave the small code attached
Code: Select all
void setup() {
// initialize digital pin as an output.
pinMode(2, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(2, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(2, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}