esp8266-oled-ssd1306 icon indicating copy to clipboard operation
esp8266-oled-ssd1306 copied to clipboard

help working exmaples with heltec v2

Open qubolino opened this issue 3 years ago • 1 comments

i have a heltex esp32 board with screen wired like this

#define PIN_I2C_SCL GPIO_NUM_15   // SCL pin
#define PIN_I2C_SDA GPIO_NUM_4    // SDA pin
#define OLED_I2C_ADDR 0x3C        // I2C address of the OLED display
#define PIN_OLED_RST GPIO_NUM_16  // OLED RESET: low-active

i'm trying to make the simple demo example work with it but no success so far... any ideas?

qubolino avatar Feb 25 '22 15:02 qubolino

Hi, for heltec_wifi_lora_32_V2

i have success with :

in main.cpp:

SSD1306Wire display(0x3c, 4, 15,GEOMETRY_128_64); // ADDRESS, SDA, SCL - SDA and SCL usually populate automatically based on your board's pins_arduino.h e.g. https://github.com/esp8266/Arduino/blob/master/variants/nodemcu/pins_arduino.h

in the file SSD1306Wire.h: i add somme code at the begin of the connect() function: (for reset the OLED Modul)

    bool connect() {
        pinMode(16,OUTPUT);
        digitalWrite(16, LOW);
        delay(50);
        digitalWrite(16, HIGH);

andreaslanz avatar Apr 08 '22 13:04 andreaslanz