A C++ ESP-IDK component for controlling a SSD1306 OLED display. This is based on the arduino driver provided by Heltec, which appears to be based on drivers created by Thing Pulse, whose products you should check out, if for no other reason, because they appear to have done most of the heavy lifting for this display driver and released it open source.
See this thing pulse github page for better documenation of the API. THis driver is essentially the same, just adapted to work with the ESP-IDK libraries instead of Arduino.
A simple example:
#include "SSD1306.h"
extern "C" {
void app_main()
{
SSD1306 display(GPIO_NUM_4, GPIO_NUM_15, GPIO_NUM_16);
display.init();
display.drawString(0, 0, "Hi Universe");
}
I add this to my projects as a git submodule in the components
directory. However, you may also simply create a subdirectory in your project and simply copy the contents of this repo there.