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

rin67630
Posts: 99
Joined: Sun Mar 11, 2018 5:13 pm

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

Postby rin67630 » Wed Jul 21, 2021 4:37 pm

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...

lbernstone
Posts: 637
Joined: Mon Jul 22, 2019 3:20 pm

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

Postby lbernstone » 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

rin67630
Posts: 99
Joined: Sun Mar 11, 2018 5:13 pm

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

Postby rin67630 » Wed Jul 21, 2021 9:12 pm

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

lbernstone
Posts: 637
Joined: Mon Jul 22, 2019 3:20 pm

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

Postby lbernstone » Wed Jul 21, 2021 9:26 pm

The reset is usually attached to GPIO16. Try setting that pin high to turn on the device.

rin67630
Posts: 99
Joined: Sun Mar 11, 2018 5:13 pm

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

Postby rin67630 » Thu Jul 22, 2021 1:23 pm

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

Who is online

Users browsing this forum: AdsBot [Google] and 46 guests