Heltech Lora Wifi ESP32 V2 OLED not displaying after Platform IO and Library Upd

Hi All,

I was using the following code to transmit a message from one Heltech Lora Wifi ESP32 to another. Code worked good and the OLED worked fine. I’ve updated Platform IO and updated the libraries and now I get nothing on the OLED. I’ve changed the screen size on Adafruit_SSD1306.h to 128 X 64. I’ve tried the code on two different boards with same result, so hardware is not at fault.
Any ideas why the OLED does no longer display anything?

#include <SPI.h>
#include <LoRa.h>
#include <Adafruit_SSD1306.h>
#include <Arduino.h>
 
//Define all button variables.
//YELLOW
const int button1 = 13;
int button1state = 0;

//GREEN
const int button2 = 12;
int button2state = 0;
//WHITE
const int button3 = 33;
int button3state = 0;
//BLUE
const int button4 = 32;
int button4state = 0;

//This is the unique code that get transmitted
char message[4] = {'0','0','0','0'};

//Define all transmission variables.

//OLED pins to ESP32 GPIOs via this connecthin:
//OLED_SDA -- GPIO4
//OLED_SCL -- GPIO15
//OLED_RST -- GPIO16

//Define type of OLED used.
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels
#define OLED_RESET -1

//This is a sample for the screen display
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);

// WIFI_LoRa_32 ports
// GPIO5  -- SX1278's SCK
// GPIO19 -- SX1278's MISO
// GPIO27 -- SX1278's MOSI
// GPIO18 -- SX1278's CS
// GPIO14 -- SX1278's RESET
// GPIO26 -- SX1278's IRQ(Interrupt Request)
 
#define SS      18
#define RST     14
#define DI0     26
#define BAND    915E6 
 

void setup() {
  //SETUP BUTTONS AS INPUTS/OUTPUTS
  pinMode(button1, INPUT);
  pinMode(button2, INPUT);
  pinMode(button3, INPUT);
  pinMode(button4, INPUT);

  pinMode(25,OUTPUT); //Send success, LED will bright 1 second
  pinMode(16,OUTPUT);
  digitalWrite(16, LOW);    // set GPIO16 low to reset OLED
  delay(50); 
  digitalWrite(16, HIGH);
   
  Serial.begin(115200);
  while (!Serial); //If just the the basic function, must connect to a computer
  // Initialising the UI will init the display too.

  display.begin(SSD1306_SWITCHCAPVCC,0x3C);  // enable internal HV supply for display
  display.clearDisplay();
  display.setTextColor(WHITE);
  display.setTextSize(1);
  display.setCursor(0,0); 
  display.print("Lora Sender");
  display.display();

  delay(2000);
  display.clearDisplay();
  display.display();
   
  SPI.begin(5,19,27,18);
  LoRa.setPins(SS,RST,DI0);
  Serial.println("LoRa Sender");
  if (!LoRa.begin(BAND)) {
    Serial.println("Starting LoRa failed!");
    while (1);
  }

  display.setCursor(0,0);
  Serial.println("LoRa Initial OK");
  display.print("Lora Initializing OK");
  display.display();
  delay(2000);

   display.clearDisplay();
    display.display();
}
void loop() {

  //Button setup
  button1state = digitalRead(button1);
  button2state = digitalRead(button2);
  button3state = digitalRead(button3);
  button4state = digitalRead(button4);

//Do this if no button is being pressed
if (button1state==LOW && button2state==LOW && button3state==LOW && button4state==LOW)
 
{
   display.setCursor(0,0);
    display.print("Ready");
    display.setCursor(0,15);
    display.print(message);
    display.display();
}

//Button 1 code
  if (button1state==HIGH)
  {
    message[0]='1';


    //Display code
    display.clearDisplay();
    display.setCursor(0,15);
    display.print(message);
    display.display();
   
    // send packet
    LoRa.beginPacket();
    LoRa.print(message);
    LoRa.endPacket();
    delay(1000);

    //clear display at end of function
    display.clearDisplay();
    display.display();

    //Resume original value

    message[0]='0';

  }

//Button 2 code
  if (button2state==HIGH)
  {
    message[1]='1';


    //Display code
    display.clearDisplay();
    display.setCursor(0,15);
    display.print(message);
    display.display();
   
    // send packet
    LoRa.beginPacket();
    LoRa.print(message);
    LoRa.endPacket();
    delay(1000);

    //clear display at end of function
    display.clearDisplay();
    display.display();

    //Resume original value

    message[1]='0';

  }
  //Button 3 code
  if (button3state==HIGH)
  {
    message[2]='1';


    //Display code
    display.clearDisplay();
    display.setCursor(0,15);
    display.print(message);
    display.display();
   
    // send packet
    LoRa.beginPacket();
    LoRa.print(message);
    LoRa.endPacket();
    delay(1000);

    //clear display at end of function
    display.clearDisplay();
    display.display();

    //Resume original value

    message[2]='0';

  }


  //Button 4 code
  if (button4state==HIGH)
  {
   //Switch last digit. This will set forward of reverse

   if (message[3]=='1')
   {
     message[3]='0';
   }
   else
   {
     message[3]='1';
   }
   
    //Display code
    display.clearDisplay();
    display.setCursor(0,15);
    display.print(message);
    display.display();
   
    // send packet
    LoRa.beginPacket();
    LoRa.print(message);
    LoRa.endPacket();
    delay(1000);

    //clear display at end of function
    display.clearDisplay();
    display.display();

  }

For anyone else that runs into this issue, I wasn't able to find a solution but I was able to get everything to run by rewriting the code and using the U8x8lib.h library instead of the Adafruit_SSD1306.h.