-->
Page 1 of 3

ESP-01 GPIO keep high but goes low!

PostPosted: Wed Sep 09, 2015 12:30 pm
by westywest
I hope someone can help.

I have installed this IRRemote on the ESP-01:
https://github.com/markszabo/IRremoteESP8266

After some fiddling, I got it working. I have the IR LED connected to GPIO 0. The ESP-01 would only load and run the program if the LED was NOT connected to GPIO 0. So obviously it is being pulled 'low' at boot and the device is entering 'flash' mode. I tried the same with GPIO 2, with the same effect.

Sorry if I am using the wrong terms, but I'm sure you'll understand what I am asking.

How can I have an IR LED connected to one of the GPIO's and successfully use the ESP-01? As I've said, the only way to do it ATM is to power on the device THEN connect the LED. Obviously not ideal.

Some advice would be appreciated. Thank you.

Re: ESP-01 GPIO keep high but goes low!

PostPosted: Wed Sep 09, 2015 2:41 pm
by dkinzer
westywest wrote:I have the IR LED connected to GPIO 0.
Please explain how you have the LED connected. I ask because an LED can be driven two ways: by sinking current into the I/O pin (low activates the LED) or by sourcing current from the I/O pin (high activates the LED). Also, does the LED have an internal current limiting resistor or did you add one? If the latter, what is the value?

Re: ESP-01 GPIO keep high but goes low!

PostPosted: Wed Sep 09, 2015 3:13 pm
by Barnabybear
Hi, use pull up resistors on GPIO 0 & 2 (1K -> 10K).
Connect the LED between GPIO 0 & 2 (with series current limiting resistor).
After boot take both GPIO 0 & 2 low.
Run IR code as normal.
This saves inverting the code output to sink current.
If you need to use the other GPIO then you'll have to sink & invert.

Re: ESP-01 GPIO keep high but goes low!

PostPosted: Wed Sep 09, 2015 3:28 pm
by martinayotte
I've answered several times about this problem. Here is one of the threads with images that shows how to connect LEDs on GPIO2 or GPIO0 :
viewtopic.php?f=13&t=3119&p=23874&hilit=source+sink#p23874