Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By Fibri
#86413 Hello.
I am trying to interface an I2C sensor on ESP8266.
I would like to use the GPIO0 and GPIO2 pins for the I2C_SCL and I2C_SDA signals.
Unfortunately, it seems that the GPIO0 pin creates some problems, both if used as I2C_SCL or
if used as I2C_SDA.

I am developing on the official Espressif ESP8266-DevKitC board.
I noticed that on this board the GPIO0 pin is connected to the reset button, as shown in the attached figure.
Could this particular create problems for I2C communication?
Could anyone help me?
Thanks.
You do not have the required permissions to view the files attached to this post.
User avatar
By eriksl
#86475 Yes it is possible, even though both GPIO0 and GPIO2 spit a lot of nonsense (I2C-wise) on boot. You may want to do the "I2C reset procedure" after boot: have both SCL and SDA quiesce, generate a stop condition and then cycle SCL eight times. That should be enough to recover most I2C devices from every possible state.