Page 1 of 1

I2C Address of the OLED display for an Heltec LoRa module?

Posted: Wed Jul 21, 2021 4:37 pm
by rin67630
The Heltec LoRa V1 ESP32module appears to have a distinct I2C connection to their OLED display.

I tried to access the display using the standard SSD1306 librry that way:
#ifdef CONTR_IS_HELTEC
SSD1306Wire display(0x3c, 15, 4); //OLED 128*64 soldered
#endif

since they announced to use GPIO15 as SCL and GPIO04 as SDA.
The module is however not accessible under the standard address 0x3C.

does someone know how to run that display with the regular library?
I would not want to use the heltec library since they use a different syntax and I would have to rewrite hundreds of lines of code and maintain two versions...

Re: I2C Address of the OLED display for an Heltec LoRa module?

Posted: Wed Jul 21, 2021 5:40 pm
by lbernstone
0x78 is a common location. You can use a I2C scanner to find it. https://github.com/stickbreaker/arduino ... s/i2c_scan

Re: I2C Address of the OLED display for an Heltec LoRa module?

Posted: Wed Jul 21, 2021 9:12 pm
by rin67630
lbernstone wrote:
Wed Jul 21, 2021 5:40 pm
0x78 is a common location. You can use a I2C scanner to find it. https://github.com/stickbreaker/arduino ... s/i2c_scan
Thank you, unfortunately that address does not work.
The ESP32 I2C scanner does not find any address when used with
SCL=15, SDA=4

Re: I2C Address of the OLED display for an Heltec LoRa module?

Posted: Wed Jul 21, 2021 9:26 pm
by lbernstone
The reset is usually attached to GPIO16. Try setting that pin high to turn on the device.

Re: I2C Address of the OLED display for an Heltec LoRa module?

Posted: Thu Jul 22, 2021 1:23 pm
by rin67630
Finally the Heltec display is working using its own driver:
That driver is managing the two I2C channels, so you do not need the Wire.h library that would conflict.

With

Code: Select all

  auto &display = *(Heltec.display);
at the beginning of setup() and at the beginning of loop(), you can use the usual display primitives like

Code: Select all

  auto &display = *(Heltec.display);
  Heltec.begin(true /*DisplayEnable Enable*/, false /*LoRa Disable*/, true /*Serial Enable*/);
  display.flipScreenVertically();
  display.setFont(ArialMT_Plain_10);
  display.setTextAlignment(TEXT_ALIGN_LEFT);
  display.setFont(ArialMT_Plain_10);
  display.drawString(0, 10, "Display Init");
  Console4.print("Display Init");
  display.display();