Heltec_ESP32 icon indicating copy to clipboard operation
Heltec_ESP32 copied to clipboard

OLED display not initialized correctly for wifi_kit or Wifi_LoRa

Open joelkoz opened this issue 1 year ago • 2 comments

I am trying to compile using the latest source for a wifi_kit_32_v3 board and the OLED does not work. I noticed that "heltec.cpp" has the following line 11:

#if defined( Class_Wifi_Kit ) || defined( Class_Wifi_LoRa ) display = new SSD1306Wire(0x3c, SDA_OLED, SCL_OLED, RST_OLED, GEOMETRY_128_64);

yet the new SSD1306Wire class has a constructor with signature:

SSD1306Wire(uint8_t _address, uint32_t _freq, int sda,int scl, DISPLAY_GEOMETRY g = GEOMETRY_128_64,int8_t _rst=-1)

I believe the line in heltec.cpp needs to be:

display = new SSD1306Wire(0x3c, 700000U, SDA_OLED, SCL_OLED, GEOMETRY_128_64, RST_OLED);

joelkoz avatar Apr 15 '24 22:04 joelkoz

Line 13 of heltec.cpp appears to have the wrong signature also. This issue may appear elsewhere. I do not have a wireless stick to test, so I am not making a PR, but I'm pretty sure those two lines both need to be fixed for the OLED displays to work.

joelkoz avatar Apr 15 '24 22:04 joelkoz