B4R Question [Solved]ESP8266 I2C: Can I change I2C pins?

teddybear

Well-Known Member
Licensed User
I am learning how to control ssd1306 oled by I2C, it works when I use the default SDA and SCL pins.
According to esp8266 document, "The ESP8266 doens’t have hardware I2C pins, but it can be implemented in software. So you can use any GPIOs as I2C. Usually, the following GPIOs are used as I2C pins: GPIO5: SCL GPIO4: SDA",
I would like to change them to other pins, but it does not work. maybe I miss something to do?

Thanks in advance.
 
Last edited:
Solution

Johan Schoeman

Expert
Licensed User
Longtime User
You can write the code if you want to use any other 2 digital pins.

 
Upvote 0
Solution

teddybear

Well-Known Member
Licensed User
You can write the code if you want to use any other 2 digital pins.

Thank you , I missed to initialize the pin mode as output.
 
Upvote 0
Top