(deleted)

(deleted)

Are you defining the GPIO2 as an output?
check this out: http://www.instructables.com/id/How-to-use-the-ESP8266-01-pins/
Mopheus:
Hi everyone, I have a simple question but after some research online I can't still figure out the solution. Sorry for my bad english. It's quite simple, I'm using this very easy circuit to control an IR led, but when I connect it to GPIO0 or GPIO2 on my ESP, it doesn't work. While it works on GPIO3 (RX)... so, I think it's because for some reason, when connected to GPIO0 is pulling up (or down) the pin and going into FLASH mode. Is it possible ?Can someone help me understand how to change this circuit to work with GPIO0 (is the one I need to use actually).
Thanks.
Several things:
[5V - 2(1.1V) - 0.1V]/34Ω = 79.4mA where: 1.1V is the IF of each LED and 0.1V is the VCE(sat) of the transistor.
BUT, that's assuming a VCE(sat) of 0.1V. Even if the VCE(sat) is more like 0.3V, and each LED VF is more like 1.3V, I still get around 62mA:
[5V - 2(1.3V) - 0.3V]/34Ω = 61.8mA
So, are you over driving those LEDs. And could that have fried them?
(deleted)
Read the link in my previous post. They specifically talk about the ESP power up in different modes, etc.
check this out: http://www.instructables.com/id/How-to-use-the-ESP8266-01-pins/
Pay attention to the special properties of GPIO0 and GPIO2 of the ESP-01.
http://www.forward.com.au/pfod/ESP8266/GPIOpins/ESP8266_01_pin_magic.html
If you don't, the ESP-01 will not boot properly and you also will not be able to program it.
It is easier to just buy a ESP8266 module with more pins.
Using esp-01 can be a bit annoying sometimes, for somethings the 0 and 2 pins just refuse to work as you would like, if you need serial port and a pin that play nice here is a trick that i use.
Serial1.end();
Serial.end();
Serial.begin(115200, SERIAL_8N1, SERIAL_RX_ONLY ); //this uses the RX pin
Serial1.begin(115200, SERIAL_8N1, SERIAL_TX_ONLY );//this uses pin 2 as TX
This will leave pin 1 free to use for something else.
Remember you will probably still need to use 10k pull-ups on pin 0 and 2.
Best of luck.
(deleted)