1

In the following circuit when ESP01 is turned on; For about less than a second, the GPIO 2 output is activated and the transistor output is activated, and after the boot is completed, the outputs are cut off ...

Is there a way to prevent this from happening?

I want ESP01 boot normally without activated GPIO2 at the first ...

Note: GPIO2 must be pullup to boot

enter image description here

this is my code:

void setup() {
  pinMode(2, OUTPUT);     
  digitalWrite(2, LOW);   
}

void loop() {
  digitalWrite(2, LOW);   
  delay(1000);                      
  digitalWrite(2, HIGH);  
  delay(2000);                      
}
Baba
  • 125
  • 7

1 Answers1

1

Add an inverter between GPIO2 and the input of the ULN2003.

In the software invert the polarity that you are driving GPIO2 (ie set it low to turn on the output).

When the system turns on GPIO2 will be pulled high or open. Either of which will cause the output to be disabled. When you set GPIO2 low the output will turn on.

Kevin White
  • 32,097
  • 1
  • 47
  • 74