Arduino Nano & OLED Display Multiple Library Issue

Hi All,

I have made a circuit that consists of a OLED Display running Adafruit_SH110X. All works fine until I want to add another library to my code such as IRLib2 and IRremote. When the arduino boots up the screen doesn't show anything. I have narrowed it down to a library issue as it only occurs when I add another library to the code.

Could anyone explain how to fix this, or if this can be fixed?

There may be a library resource conflict, but without seeing the code it is impossible to say for sure what it may be.

Read the forum guidelines to see how to properly post code and some hints on how to get the most from this forum.
Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in code tags.

Hello, here is the code sorry for not posting it in the original. You can see where i've commented out the faulty libraries. Like I say the display wont turn on at all if one of these libraries is added.

#include <Wire.h>
#include <Adafruit_SH110X.h>
//#include <Adafruit_GFX.h>
//#include <IRLibAll.h>


#define DECODEBUTTON 6

#define OLED_WIDTH 128
#define OLED_HEIGHT 64

#define OLED_ADDR   0x3C

Adafruit_SH1106G display(OLED_WIDTH, OLED_HEIGHT);

int decodeButton = 6;
int upButton = 5;
int downButton = 4;
int selectButton = 2;
int menu = 1;
int val = 0;

//IRsend mySender;

void setup() {
  pinMode(DECODEBUTTON, INPUT_PULLUP);
  pinMode(upButton, INPUT_PULLUP);
  pinMode(downButton, INPUT_PULLUP);
  pinMode(selectButton, INPUT_PULLUP);
  display.begin(OLED_ADDR);
  display.clearDisplay();

  display.setTextSize(1);
  display.setTextColor(SH110X_WHITE);
  display.setCursor(0, 0);
  display.println("Welcome");

  display.setTextSize(2);
  display.setTextColor(SH110X_WHITE);
  display.setCursor(0, 17);
  display.println("NAFANEEL");
  display.println("");

  display.display();

  delay(5000);

  //checkDecode = digitalRead(decodeButton)

  
  updateMenu();
}

void loop() {
  if (!digitalRead(downButton)){
    menu++;
    updateMenu();
    delay(100);
    while (!digitalRead(downButton));
  }
  if (!digitalRead(upButton)){
    menu--;
    updateMenu();
    delay(100);
    while(!digitalRead(upButton));
  }
  if (!digitalRead(selectButton)){
    executeAction();
    updateMenu();
    delay(100);
    while (!digitalRead(selectButton));
  }
}

void updateMenu() {
  switch (menu) {
    case 0:
      menu = 1;
      break;
    case 1:
      display.clearDisplay();
      display.setTextColor(SH110X_WHITE);
      display.setTextSize(2);
      display.setFont(NULL);
      display.setCursor(2, 8);
      display.println("EPSON");
      display.setCursor(10, 30);
      display.setTextSize(1);
      display.println("> POWER");
      display.display();
      break;
    case 2:
      display.clearDisplay();
      display.setTextColor(SH110X_WHITE);
      display.setTextSize(2);
      display.setFont(NULL);
      display.setCursor(2, 8);
      display.println("EPSON");
      display.setCursor(10, 30);
      display.setTextSize(1);
      display.println("> FREEZE");
      display.display();
      break;
    case 3:
      display.clearDisplay();
      display.setTextColor(SH110X_WHITE);
      display.setTextSize(2);
      display.setFont(NULL);
      display.setCursor(2, 8);
      display.println("EPSON");
      display.setCursor(10, 30);
      display.setTextSize(1);
      display.println("> ZOOM +");
      display.display();
      break;
    case 4:
      display.clearDisplay();
      display.setTextColor(SH110X_WHITE);
      display.setTextSize(2);
      display.setFont(NULL);
      display.setCursor(2, 8);
      display.println("EPSON");
      display.setCursor(10, 30);
      display.setTextSize(1);
      display.println("> ZOOM -");
      display.display();
      break;
    case 5:
      display.clearDisplay();
      display.setTextColor(SH110X_WHITE);
      display.setTextSize(2);
      display.setFont(NULL);
      display.setCursor(2, 8);
      display.println("PIONEER");
      display.setCursor(10, 30);
      display.setTextSize(1);
      display.println("> POWER");
      display.display();
      break;
    case 6:
      display.clearDisplay();
      display.setTextColor(SH110X_WHITE);
      display.setTextSize(2);
      display.setFont(NULL);
      display.setCursor(2, 8);
      display.println("DECODE");
      display.setCursor(10, 30);
      display.setTextSize(1);
      display.println("> DECODE IR SIGNALS");
      display.display();
      break;
    case 7:
      menu = 6;
      break;
  }
}

void executeAction() {
  switch (menu) {
    case 1:
      action1();
      break;
    case 2:
      action2();
      break;
    case 3:
      action3();
      break;
    case 4:
      action4();
      break;
    case 5:
      action5();
      break;
    case 6:
      action6();
      break;
  }
}

void action6() {
  while(digitalRead(DECODEBUTTON) == LOW){           
    display.clearDisplay();
    display.setTextColor(SH110X_WHITE);
    display.setTextSize(1);
    display.setFont(NULL);
    display.setCursor(0, 1);
    display.println("IR DECODE");
    display.setCursor(0, 4);
    display.println("_____________________");
    display.setCursor(0, 20);
    display.println("COMPANY");
    display.setCursor(0, 40);
    display.println("CODE");
    display.display();
  }
    
  
  display.clearDisplay();
  display.setTextColor(SH110X_WHITE);
  display.setTextSize(1);
  display.setFont(NULL);
  display.setCursor(0, 1);
  display.println("IR DECODE");
  display.setCursor(0, 4);
  display.println("_____________________");
  display.setCursor(0, 20);
  display.println("SWITCH ON DECODE");
  display.setCursor(0, 30);
  display.println("TO BEGIN");
  display.display();
  delay(1000);
}

void action1() {
  display.clearDisplay();
  display.setTextColor(SH110X_WHITE);
  display.setTextSize(1);
  display.setFont(NULL);
  display.setCursor(2, 8);
  display.println("IR TRANSMITER");
  display.setCursor(1, 30);
  display.setTextSize(1);
  display.println("TRANSMITTING CODE...");
  display.display();
  //IR SEND CODE HERE
  delay(500);
}
void action2() {
  display.clearDisplay();
  display.setTextColor(SH110X_WHITE);
  display.setTextSize(1);
  display.setFont(NULL);
  display.setCursor(2, 8);
  display.println("IR TRANSMITER");
  display.setCursor(1, 30);
  display.setTextSize(1);
  display.println("TRANSMITTING CODE...");
  display.display();
  //IR SEND CODE HERE
  delay(1500);
}
void action3() {
  display.clearDisplay();
  display.setTextColor(SH110X_WHITE);
  display.setTextSize(1);
  display.setFont(NULL);
  display.setCursor(2, 8);
  display.println("IR TRANSMITER");
  display.setCursor(1, 30);
  display.setTextSize(1);
  display.println("TRANSMITTING CODE...");
  display.display();
  //IR SEND CODE HERE
  delay(1500);
}
void action4() {
  display.clearDisplay();
  display.setTextColor(SH110X_WHITE);
  display.setTextSize(1);
  display.setFont(NULL);
  display.setCursor(2, 8);
  display.println("IR TRANSMITER");
  display.setCursor(1, 30);
  display.setTextSize(1);
  display.println("TRANSMITTING CODE...");
  display.display();
  //IR SEND CODE HERE
  delay(1500);
}
void action5() {
  display.clearDisplay();
  display.setTextColor(SH110X_WHITE);
  display.setTextSize(1);
  display.setFont(NULL);
  display.setCursor(2, 8);
  display.println("IR TRANSMITER");
  display.setCursor(1, 30);
  display.setTextSize(1);
  display.println("TRANSMITTING CODE...");
  display.display();
  //IR SEND CODE HERE
  delay(1500);
}