-->
Page 1 of 1

ESP-12 I2C pins for OLED screen

PostPosted: Sun Oct 16, 2016 11:32 am
by Dziastis
Hello!

I'm new to ESP8266 and I encountered one problem when trying out OLED display:
I can not figure out, which pin's of ESP-12 module are used for I2C when connecting OLED display and programming in ESP8266basic...
Could anyone help me?
Display is working (tested with Arduino example's).

Thanks in advance.

Re: ESP-12 I2C pins for OLED screen

PostPosted: Mon Oct 17, 2016 12:15 am
by trackerj
From ESPBasic Version 3.0 Alpha 43 you have also the i2c.setup function available so you can use any GPIO you want and is free, but I recommend you GPIO4 and 5 for SDA/SCL.

i2c.setup():
Will change the default pins for the I2C interface.
i2c.setup({SDA}, {SCL})

After connectiing the display and I2C bus setup you can run the I2C scanbus to see if all OK.

More details in the related I2C setup and scanbus post

I2C scanbus results example in browser :

Image

Re: ESP-12 I2C pins for OLED screen

PostPosted: Mon Oct 17, 2016 11:07 am
by Dziastis
Oh I can use i2c.setup in order to change pin's for oled functions :o
Didn't realise myself that those functions could be used together :roll:
Now display is working, thank's very much ;)