Qrome / printer-monitor

OctoPrint 3D Printer Monitor using Wemos D1 Mini ESP8266
MIT License
476 stars 164 forks source link

Waveshare 1.3" OLED display not working #20

Open testudor opened 6 years ago

testudor commented 6 years ago

For some reason my 1.3" OLED display from Waveshare did not work out of the box. I managed to make it work by resetting the display before initializing. I added this:

  pinMode(D3, OUTPUT);
  digitalWrite(D3, HIGH);
  delay(1);
  digitalWrite(D3, LOW);
  delay(10);
  digitalWrite(D3, HIGH);

before display.init(); in the setup function. (D3 is connected to the OLED's reset pin)

wabbitguy commented 6 years ago

Isn't the WaveShare 1.3" OLED an SPI device? There's no reset pin on an I2C OLED.

testudor commented 6 years ago

It is configured for SPI by default, but you can switch it to I2C by soldering the jumpers on the bottom side. Most other SSD1106 displays do not have the reset pin exposed. I think they just have it connected to ground with a capacitor and to VDD with a pullup resistor.

wabbitguy commented 6 years ago

You'd think Waveshare would document that little tidbit in their data manual but apart from listing it in their table on the first page, it's absent in the I2C description. Thus, five wire I2C.

Good catch though because it's anything but obvious.

soundylinz commented 3 years ago

Original connection:

SDA -> D2 SCL -> D5 VCC -> 5 V + GND -> GND-

My connection:

SDA -> D2 SCL -> D1 <<<<<<-------- VCC -> 5 V + GND -> GND-

I found out because an I2C scanner couldn't find a device. That's why I tried around.

I've used this I2C scanner: http://www.esp8266learning.com/i2c-scanner.php

Qrome commented 3 years ago

@soundylinz -- depends on how you wire it. If you wire to D5 then use D5 -- if you wire to D1 then use it.

jolo1581 commented 2 years ago

The RES Pin must be set to 3.3V (high)