Heltec wifi kit 32 V3 no oled with micropython

I do not get the ssd1306 display to work with micropython.

I found out, that with Version 3 the pins have changed.

oled_scl = Pin 18
oled_sda = Pin 17
oled_rst = Pin 21

I am using the ssd1306.py library from the micropython-lib.

Instead of displaying text or graphics, the oled shows just some weired spots/points.

I also get an error message in Thonny:
“Warning: I2C(-1, …) is deprecated, use SoftI2C(…) instead”

Here is my micropython code:

from machine import Pin, I2C
from ssd1306 import SSD1306_I2C

pin21 = Pin(21, Pin.OUT)
pin21.on()

i2c = I2C(scl=Pin(18), sda=Pin(17))

oled = SSD1306_I2C(128, 64, i2c)
oled.fill(0)

oled.text(“Testtext”,0 ,0)
oled.show()

Any idea on what the problem is?

Has anyone got the V3 oled to work with micropython?

Thank’s for your support.

I just got mine to work after reading your post. Looks like all you needed to do was toggle the reset off then back on.

import network
import time
import machine
import ssd1306
from machine import Pin, I2C
from ssd1306 import SSD1306_I2C

#Toggle reset
pin21 = Pin(21, Pin.OUT)
pin21.off()
pin21.on()

i2c = I2C(scl=Pin(18), sda=Pin(17))

display = SSD1306_I2C(128, 64, i2c)
display.fill(0)

# Write "hello" to the display
display.text("hello", 0, 0)
display.show()