IR & keypade libraries not working

Hi!
I'm trying to use adafruit IR library and keypad library examples given with libraries they work fine (print on serial monitor and switch led on pin 13) on Ardiuno Uno but when I combine both examples in a single sketch IR remote/library works fine but keypad don't work at all. I think there may be some limitation/conflict in libraries which I don't know

And your code and wiring are?

I think there may be some limitation/conflict in libraries which I don't know

Well, I think it is a PEBCAK error. I'd say that the odds that I'm right are higher than the odds that you are right.

Post your code and schematic to prove me wrong.

Thanks to both of you for replying.

PaulS:
I'd say that the odds that I'm right are higher than the odds that you are right.

You are right sir! but I read a post on web someone wrote about conflict of libraries so I asked here other wise I'm not so experienced to challenge the libraries.

This is my code.

#include "Adafruit_NECremote.h"
#include <Keypad.h>
#define IRpin 4



const byte ROWS = 4; //four rows
const byte COLS = 4; //four columns
//define the cymbols on the buttons of the keypads
char hexaKeys[ROWS][COLS] = {
  {'1','2','3'},
  {'4','5','6'},
  {'7','8','9'}
};
byte rowPins[ROWS] = {10, 9, 8}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {7, 6, 5 }; //connect to the column pinouts of the keypad

//initialize an instance of class NewKeypad
Keypad customKeypad = Keypad( makeKeymap(hexaKeys), rowPins, colPins, ROWS, COLS); 


int ledPin = 13; 

Adafruit_NECremote remote(IRpin);

void setup(void) {
  Serial.begin(115200);
  Serial.println("Ready to decode IR!");
  pinMode(ledPin, OUTPUT);
}

int lastcode = -1;

void loop(void) {  
  int c = remote.listen(0.0001);

  if (c >= 0) {
    Serial.print("Received code #"); 
    Serial.println(c, DEC);
        lastcode = c;
  } else if (c == -3) {
    Serial.print("Repeat (");
    Serial.print(lastcode);
    Serial.println(")");
  } else if (c == -2) {
    Serial.println("Data error");
  } else {
    Serial.println("Timed out waiting!");
  }

    switch (c){
      case 7:                   // PRIVIUS
        digitalWrite(ledPin,!digitalRead(ledPin));
      break;
    }
  char customKey = customKeypad.getKey();
  
  if (customKey){
    Serial.println(customKey);
    if (customKey == 7){digitalWrite(ledPin,!digitalRead(ledPin));}
  }
    
      
}

And this is the schematic.
I've attached schematic image because I'm not sure it will be uploaded or not as it is not shown in preview.

Pleas NOTE I'm using PHYSICAL hardware i.e UNO R3 according to this Schematic board in schematic is Arduino Nano as I have modified template for reference only.

Does the Serial.print() not happen? Or does pressing the 7 key not toggle the LED?

Pressing the 7 key should result in customkey containing the value '7', but you are checking for a value of 7.

Serial.print () does not work for keypad. pressing the 7 key do not toggle the LED.

PaulS:
Pressing the 7 key should result in customkey containing the value '7', but you are checking for a value of 7.

I can not understand this line where is my mistake can you explain please.
Thanks for your time.

UPDATE:
what I understood is that problem is the line.int c= remote.listen()

It is a blocking call it waits for an ir signal for # of seconds given in brackets () or forever if # is less than 0.

What he meant is ASCII code of character '7' is not the number 7

m_naveed:
UPDATE:
what I understood is that problem is the line.int c= remote.listen()

It is a blocking call it waits for an ir signal for # of seconds given in brackets () or forever if # is less than 0.

The header file says:

 int16_t listen(int16_t maxwaitseconds = 0);

Why are you passing a float to the function? Your float will get truncated to 0, which means wait forever.

A value of 0 means wait forever. A non-zero value defines how long to wait, in seconds. Why the function takes a signed value is a mystery. But, then, Adafruit makes great products supported by crappy software, so I am not surprised.

Thanks to both of you problem is solved.

PaulS:
Why are you passing a float to the function? Your float will get truncated to 0, which means wait forever.

I was just passing the time that time by doing stupid changing s like this.
One thing more is their any way to make it wait for time les than 1 second.

One thing more is their any way to make it wait for time les than 1 second.

Modify the library.

Thanks