Using IR remote to make a 3 digit number

After checking out the above sketch, try this version.

You will need to change the following line of code to meet your needs:

const byte hash           = 74;  // #  <-----<<<<<  use a button and it's code from your remote


#include <IRremote.h>

#define IR_PIN 5

#define IR_BUTTON_NEXT 64
#define IR_BUTTON_PREV 68

const byte myButtonCode[] = {82, 22, 25, 13, 12, 24, 94, 8, 28, 90};
const byte buttonCode[]   = { 9, 29,  1,  2,  3,  4,  5,  6, 7,  8};
const byte digit[]        = { 0,  1,  2,  3,  4,  5,  6,  7,  8, 9};

const byte hash           = 74;  // #  <-----<<<<<  use a button and it's code from your remote

unsigned int myNumber;

//                                   s e t u p ( )
//******************************************************************************************
void setup()
{
  Serial.begin(115200);

  IrReceiver.begin(IR_PIN);

}//END of   setup()


//                                    l o o p ( )
//******************************************************************************************
void loop()
{
  //*******************************************************
  if (IrReceiver.decode())
  {
    //Enable receiving of the next value
    IrReceiver.resume();
  }

  //*******************************************************
  //have we received a new IR code form the remote ?
  if (IrReceiver.decodedIRData.command != 0)
  {
    checkIRcode();
  }

} //END of   loop()


//                                c h e c k I R c o d e ( )
//******************************************************************************************
void checkIRcode()
{
  //**************************************
  for (byte x = 0; x < 10; x++)
  {
    //***************
    if (IrReceiver.decodedIRData.command == buttonCode[x])
    {
      Serial.print("Button = ");
      Serial.print(digit[x]);

      myNumber = myNumber * 10 + digit[x];

      break;
    }
  }

  Serial.println("");

  //***************
  if (IrReceiver.decodedIRData.command == hash)
  {
    Serial.print("My number = ");
    Serial.println(myNumber);
    Serial.println("");

    myNumber = 0;
  }

  //needed to block repeat codes
  IrReceiver.decodedIRData.command = 0;

} //END of   checkIRcode()

Edited the code