LoRa V3 OLED Display Issue - MicroPython

Hi all I am new to the forum and starting some hobby programming with the Heltec Wifi LoRa 32 (V3).

Here is a link to what I have - https://heltec.org/project/wifi-lora-32-v3/

My code is in MicroPython as seen below and is just something very simple to get me started.

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

# Initialize I2C
i2c = I2C(scl=Pin(24), sda=Pin(23))

# Initialize OLED display
display = SSD1306_I2C(128, 64, i2c)

# Clear the display
display.fill(0)
display.show()

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

Unfortunately it gives me ValueError: invalid pin for line 8 which is where I am assigning pins to scl and sda.

Below is from the schematic for this device.

image

It shows me that the OLED SCL is pin 24, the OLED SDA is pin 23. What am I not seeing here?

When I first powered up the device the display was working but after flashing the MicroPython firmware, I have not been able to see anything on the device. Not even at powerup. And this code also keeps giving me that error.

Does anyone see what I missed?

Ok I have figured it out, I was reading the schematic wrong.

SCL = pin 18
SDA = pin 19

Also had to toggle the reset pin, which is 21. I hope the below code helps anyone having the same issue on the V3 board.

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()