Wifi Kit 32 Display

I’m trying to create an application for the heltec Wifi kit 32 using the esp-idf framework.
I want to use the integrated display to show some information during run time but I haven’t been able to make it display something.
I’m using the u8g2 library and the HAL from nkolban.
I executed the i2c scanner sketch example to discover the address of the display and i found out it is 0x3C.
I saw the display list in this forum and I assumed in this board there is a ssd1306 i2c 128*64 display.

I tried to turn on the integrated LED at the and of the execution of my program but it won’t light up
So I tried to move the instruction to turn on the LED towards the start of my program and I discovered that my program stops at the u8g2_InitDisplay(&u8g2) instruction.

My project is available on github https://github.com/ilofX/CarLed.git
Is there anyone who encountered the same problem?

In the Arduino sketch environment, this is what I am using

// for Heltec ESP32 displays
U8G2_SSD1306_128X64_NONAME_F_HW_I2C display(U8G2_R0, 16, 15, 4);

For the Kit 8 ( not the ESP32)

// Heltec small display - All Boards without Reset of the Display;
U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C display(U8G2_R0, 16, 5, 4);

1 Like

Thanks for you reply, I tried in Arduino and it works, but I’m using the ESP-IDF framework and that functions aren’t available.
I tried changing the display type in my code but nothing changed.

Thank you very much

For Wifi Kit 32 board (ESP32) add “U8g2” library to your Arduino project (current version is 2.26.14) and use the following:

U8G2_SSD1306_128X64_NONAME_1_HW_I2C u8g2(U8G2_R0, 16, 15, 4);

I got it working with Arduino, but I was trying to get the display working using the ESP-IDF framework not the Arduino one.
Is there anyone with programming experience with espressif ESP-IDF framework?

I tried this approach, however I found

#include “Heltec.h”
was much easier to push text to screen and handles xbm files easily
see examples for functions