IR Remote - Random codes

I am having an issue with getting random codes from IR Receiver. I thought the problem might be in my code but now I think it is elsewhere.

I wrote a small test sketch just to check remote function which along with recognizing when specific buttons are pressed, also displays the code that was received. Using an LCD Display.

In this test sketch, it seems to work fine most of the time but then it will start returning random codes when the button is pressed. When it is acting up, I also noticed that it was registering random codes even when I wasn’t pressing a button. Sometimes pressing a button will stop the all the random codes but not always.

The problem comes up more often when running a sketch I made to control and monitor temperature in a brewing process. Not sure if that means other sensors are conflicting or not but it does it in the test sketch too so not sure where to look.

Below is my code for what ever that is worth. Not that I know anything but it is starting to sound like something is missing or wrong in my wiring. Like it is getting phantom / dirty signal causing the random codes.

/* RCA Remote code map:
 *  Up Arrow      43E8DC7E
 *  Down Arrow    E57092BD
 *  Right Arrow   636D99DA
 *  Left Arrow    D20E2899
 *  OK            1DBA1CD5
 *  Menu          2A71BFFD
 *  Volume +      22D912BB
 *  Volume -      776C6E7A
 *  Channel up    C3E3EA16
 *  Channel down  656BA055
 *  1             E85BFBA2
 *  2             DABC35D
 *  3             355A375E
 *  4             3B9ABC7D
 *  5             9A13063E
 *  6             36426241
 *  7             5DF0D642
 *  8             3E4AC59D
 *  9             8CF939A6
 *  0             99AD8799
 *  
 */
#include <IRremote.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); //Set LCD I2C address

int recv_pin=11;   //IR receive input pin
IRrecv irrecv(recv_pin);
decode_results results;
unsigned long lastcode;
int volup =0;
int voldn=0;
int chaup=0;
int chadn=0;
int right=0;
int left=0;

//**********************Void Setup*********************************
void setup() {
  irrecv.enableIRIn();  //Start the IR receiver
  lcd.begin(20, 4);
  Serial.begin(9600);
  
  splash();

}
//****************************************************************************
//                                Void Loop
//****************************************************************************
void loop() {

  //*********** Read button presses from remote ****************
  if(irrecv.decode(&results)){  
    if(results.value != 0xFFFFFFFF)
    {lastcode=results.value;
    }
 
  switch (lastcode) { //Adjust HLT or MLT setpoint based on menu value (Case select)
    case 0x2A71BFFD:  // Menu button, back to splash screen
      splash();
      break;
    case 0x636d99da:  //Right arrow
      right++;
      break;
    case 0xD20E2899:  //Left arrow
      left++;
      break;
    case 0x22d912bb:   // Volume up button
      volup++;
      break;
    case 0x776c6e7a:  // Volume down button
      voldn--;
      break;
  }
  irrecv.resume(); 
  } 
 
/*
  if(lastcode==0x22d912bb){   //5846514513  0x22d912bb
    volup++;
  }
  if(lastcode==0x776c6e7a){
    voldn++;
  }
  if(lastcode==0x636d99da){
    right++;
  }
  if(lastcode==0xD20E2899){
  left++;
}
  if(lastcode==0x2A71BFFD){
    splash();
  }
 irrecv.resume(); 
  } */

PrintData();  
}

//******************Below are Functions called from above******************************************

void PrintData(){ 
  // First Row
  lcd.setCursor(6, 0);
  lcd.print(volup);
  lcd.setCursor(17, 0);
  lcd.print(voldn);

  // Second Row
  lcd.setCursor(6, 1);
  lcd.print(chaup);
  lcd.setCursor(17, 1);
  lcd.print(chadn);

  // Third Row
  lcd.setCursor(6, 2);
  lcd.print(right);
  lcd.setCursor(17, 2);
  lcd.print(left);

  // Fourth Row
  lcd.setCursor(0,3);
  lcd.print(lastcode);
}

void Static(){
lcd.clear();
  lcd.home();
  // First Row
  lcd.setCursor(0, 0);
  lcd.print("Vol +    |");
  lcd.setCursor(10, 0);
  lcd.print("Vol -");

  // Second Row
  lcd.setCursor(0, 1);
  lcd.print("Cha +    |");
  lcd.setCursor(10, 1);
  lcd.print("Cha -");

  // Third Row
  lcd.setCursor(0, 2);
  lcd.print("Right    |");
  lcd.setCursor(10, 2);
  lcd.print("Left");
}

void splash(){
lcd.clear();
  lcd.home();
  lcd.setCursor(4, 0);
  lcd.print("WELCOME TO");
  lcd.setCursor(18, 0);
  lcd.write(3); //Upper left logo
  lcd.write(4); //Upper right logo
  lcd.setCursor(3, 1);
  lcd.print("Hickey Brewing");
  lcd.setCursor(18, 1);
  lcd.write(5); //Lower left logo
  lcd.write(6); //Lower right logo
  lcd.setCursor(3, 2);
  lcd.print("press any key");
  lcd.setCursor(0, 3);
  lcd.print("v2.2   to start");
 //This will pause program until a button is pressed, then continue with void loop.
  while (irrecv.decode(&results)==LOW) {
    delay(10);
  }
irrecv.resume();
    Static();
}