Recently iam doing a project with 4*4 keypad which is a password protected lock
and the basic concept is that i need to use nrf with the lock to switch on a relay which is connected in the reciever side
when the keypad is unlocked the light should be working ,
on the other side this is the basic concept
i have got the code for the keypad lock & it is working to but i don't know how to code for nrf
I have very limited experience with nRF24, having only looked at them this weekend for the first time.
But I'm not sure what you want to do. Since nRFs work in pairs, am I right in thinking that at the Transmitter side you would have the keypad, and on successful entering of the password that Arduino with nRF24 would transmit an "ok" to the Receiver side, where that Arduino with nRF24 would see the "ok" and activate the relay?
Starting with Robin2's nRF24 tutorial I found it dead simple to amend his SimpleTx and SimpleRx sketches to a) change the message to incorporate the status of two buttons at the Tx side and b) use those statuses (stati?) to switch two LEDs at the Rx side.
My advice is to get hold of 2x nRF24s and use Robin2's tutorial (although there are also some decent examples that come with the RF24 library) and get two Arduinos talking to each other first, with no keypads and relays in play.
Ok so in my travels today I picked up a 4x4 membrane matrix, and have tested it with the Keypad.h library's "Hello keypad" sketch; all works fine.
My after-hours project then is to hook it up to an nRF24L01-equipped Arduino as Tx, and have it activate a relay on an nRF24L01-equipped Arduino as Rx. Seems simple enough.
So OP let's compare notes in a day or three.
(But you didn't say if my interpretation of your requirements was correct.)