- Mon Dec 05, 2016 11:49 pm
#59151
You didn't say what module you are using. What port outputs you have available. I'll assume you have a board with a ESP-12 on it. If so then use GPIO4 or GPIO5. They do not produce a high on reset or startup.
You also didn't say what you are using to turn the relay on. If you are using a circuit with a npn transistor (or an N-channel mosfet) then you need to turn the pin high in order to turn the relay on. If you are using GPIO12, 13, 14 then using a 1k resistor connected to the port pin and the other side connected to the ESP ground should do it.
From what you said I have no idea what you are using for a relay circuit. Rather than me go round in circles I think it is better if you tell us what you have, what you are working with.
edit:
If you have a ESP-01 module then you only have GPIO-0, GPIO-2, RX, and TX to work with. If you need to use the first two then you would be better off using a circuit with a pnp transistor. High would be off and a low would turn the relay on.
I have been using GPIO-15 since it is low on startup.