-->
Page 1 of 9

Can't get GPIO0 to work as OUTPUT

PostPosted: Thu Mar 10, 2016 7:48 pm
by frischevollmilch
Hello,

I am trying to get GPIO0 to work as an OUTPUT for 2 hours now. I am using an ESP-01 and I know that GPIO0 is pulled up to Vcc. So when I connect an LED from Vcc (+) to GPIO0 (-) it doesn't light up for some reason. I also measured the GPIO0 voltage when it should be 0 but it stays at 3.3V no matter what I do.
I tried it with the most basic code you could think of:
Code: Select allvoid setup() {
  pinMode(0, OUTPUT);
}

void loop() {
  digitalWrite(0, 0);
}

GPIO0 stays at 3.3V at all times.
I connected Vcc, CH_PD and RST directly to Vcc and GND to GND. I tried leaving Rx and Tx connected to my USB adapter and also disonnected. Same result.
What is going on here? Thanks!

Re: Can't get GPIO0 to work as OUTPUT

PostPosted: Thu Mar 10, 2016 8:23 pm
by martinayotte
Did you make sure of the LED polarity (anode to VCC, cathode to GPIO0 with series resistor) ?

Re: Can't get GPIO0 to work as OUTPUT

PostPosted: Thu Mar 10, 2016 9:34 pm
by frischevollmilch
Yes I did, but also when I just let GPIO0 float it should measure 0V when running my code, right? I just don’t understand the behaviour.

Re: Can't get GPIO0 to work as OUTPUT

PostPosted: Thu Mar 10, 2016 10:50 pm
by martinayotte
I must admit that I've never used GPIO0 to drive LED directly, but I'm using both GPIO2/GPIO0 as I2C bus in all my projects, so making GPIO0 as Output is working for sure !
Maybe you will need to check again your wiring and find the mystery there ...