I bought the MakerHawk (Heltec) ESP32 with build-in OLED Display. But I was not able to run the OLED example in Arduino IDE.
OLED example SSD1306SimpleDemo from https://github.com/HelTecAutomation/Heltec_ESP32
For testing I just wanted to display something but it was difficult. However I mangaged to solve the Issues and now I want to share it.
First, many compiler errors like:
SSD1306SimpleDemo:35:10: error: 'class Heltec_ESP32' has no member named 'display'
--> Fixed by adding "#define WIFI_LoRa_32" before "#include "heltec.h", without this, the heltec.h will not declare display...
Next compiler errors:
heltec.cpp:104:10: error: 'LED' was not declared in this scope
and
heltec.cpp:109:10: error: 'Vext' was not declared in this scope
--> Fixed by deleting/commenting all lines with "LED" and "Vext" in the heltec.cpp. I think this should be analyzed but for now we leave it here
After this, the code can be compiled succesfully but the display was still black. --> Fixed by setting the "Board:" in Tool section to "Heltec Wifi Lora 32(V2). After Uploading the code the Display shows the sample output.
I dont think this is the final solution but it helped me to continue. Maybe here are some people to figure out why the sample program cannot be compiled and run from sketch...