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

User avatar
By ArnieNFW
#65573 I have been trying to get it to work for a few days, and finally got it to work after running your sketch. Thanx!

What I was doing wrong is confusing D4 with 4. The logical and physical pin numbering. And more, I got confused with all these remarks in the sketches:
Code: Select all// SSD1306Spi        display(D0, D2, D8);
// SH1106Spi         display(D0, D2);
// SSD1306  display(0x3c, 4, 5);
// SH1106 display(0x3c, D3, D5);


Take a look to the pinout of the ESP8266 12F (if that's the base you are using). My 12F is soldered on a WEMOS D1 board. But a look shows:
Image
D4 and D5 are used for I2C communication.
Now follow those leads to the pinheader and connect the display to that.
Run a I2C scan sketch to see if it is recognized and connected well. The code on page:

http://playground.arduino.cc/Main/I2cScanner

Mine ran well and showed an devoice on 0x3c, just like it was suppose to.

Than, of all DISPLAY codes:
Code: Select all// SSD1306Spi        display(D0, D2, D8);
// SH1106Spi         display(D0, D2);
// SSD1306  display(0x3c, 4, 5);
// SH1106 display(0x3c, D3, D5);


This one worked for me:
Code: Select allSSD1306  display(0x3c, 4, 5);

Apparantly the D4 and D5 on the 12F are 4 and 5 in the code... Duh. NOT D4 and D5 or D3 and D5. The D3 or 3 is not used for I2C on my WEMOS board.
Good luck and thanx; I got mine solved.