Can you find the mistake ? OLED Display

Hey, so sorry i confused you, i try to explain it.

Sorry so the example i used was from the heltec library. So i think that the heltec library simply doesnt work in the online editor, because the exact same code works in the IDE.

I tried the u8g2 example and now i uncommented the right line (sorry for being so stupid XD). I changed the SDA and SCL to 21 and 22 but it wont work. I looked in the schematic of the OLED display and it says that SDA and SCL are other pins, but these wont work either.
Here is the schematic, maybe you find something:

I cant get any example of u8g2 library to work...

Yea so i could send the board back on amazon, but do you know any alternatives for IOT Projects like mine, i heard of blynk or sql something, but dont know what it is

Which line did you uncomment ?
That "Hello World" example is from the u8g2 library.

Can you try with 17 (SCL) and 18 (SDA) ? I took those numbers from the schematic that you show. I even had a link to the schematic in post #10.

Perhaps the Heltec library uses pinmapping somewhere in the initialization code.
I have not checked the Heltec build environment or the Heltec library. For myself, I prefer to use the most common things that everyone else uses.

If you use the Heltec board from the ESP32 boards and then with the normal libraries, then you don't need the Heltec build environment and you don't need the Heltec libraries. But that is a choice. The mix of everything confuses me.

The board is probably not bad, it does not seem fair to return it.
The ESP32 is the best board for Wifi, I suppose that most libraries work with ESP32-S3 as well (but not the Arduino IoT Cloud).

Are you willing to buy a normal ESP32 board and start all over again ?
I learned everything about the ESP32 from here: https://randomnerdtutorials.com/

Let's do something funny :partying_face: This is also an example from the u8g2 library: https://github.com/olikraus/u8g2/blob/master/sys/arduino/u8g2_full_buffer/GraphicsTest/GraphicsTest.ino
When I put that in Wokwi, it works with either one of these lines:

  • U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);
  • U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ 22, /* data=*/ 21, /* reset=*/ U8X8_PIN_NONE);

I haven't tried pinmapping for the I2C pins. The Heltec board seems to use that.
The Wokwi project:

I already tried each of the two lines with the 17 and 18 Pins for SCL and SDA but it didnt work before. Until now the display only works just with the heltec library, no other lib works....
I will try it with other apps like blynk if it works and i probably wont buy a new one.
By pinmapping you mean that the pins on the chip are other pins than on the board ?

With pinmapping I mean that the hardware I2C bus can be routed to other pins.

@furti04 Sorry for being late, as i understand your board Is the Heltec WiFi kit V3 version. This board does not yet support the u8g2 library (due to my poor knowledge i didn't understand the reason why).
Try to replace the u8g2 with older version of the library u8x8. Tested with the same board, It worked.

The solution to your problem is the pins changed in the V3 board. CLOCK = 18, DATA = 17, and RESET = 21.

This YouTube video DavesGarage used the earlier version, but in the later comments someone calls out this solution in the comments 3 years later.

1 Like

OMG thank you! I was following Dave's Garage. You found the pins that I've been looking for for hours!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.