So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By Lxx33
#58703 An oled 128x64 (4 wired) display works on my uno with adafruit library or u8glib, but when I connect it on my esp e12 (CH340G) and connect it to pin D1 and pin D2 it will not work.
Another library (Acrorobotic) does work on those pins.

What pins on the ESP8266 are the same as de A4 and A5 pins of the arduino?

Many many tnx.
User avatar
By rudy
#58707 The ESP8266 has only one analog pin, A0. There is no equivalent for A4 and A5.
If you are using I2C then you can use D4 and D5. But don't forget to add the required pull up resistors.

I use D0 and D2 for I2C as those two pins need to have a pullup resistor on boot. I then initialize with
lcd.begin(0,2); // SDA=0, SCL=2
User avatar
By Lxx33
#58713 Not completely there, but I believe with your help victory will prevail. :)

I connected the display to the ESP8266 E12 with SLC to D2 and SDA to D0.
1 x 4,7K resistor to the 3.3V of the board and the SDA of the display
1 x 4,7K resistor to the 3.3V of the board and the SCL of the display

Un comment the following line:

U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE); // I2C / TWI

I also try to include the
Code: Select alllcd.begin(0,2);
to several places in the Helloworld sketch of the u8glib library.

I get an error that "lcd" was not declared in this scope.