1.sending part #include #include #include #include #include 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','A'}, {'4','5','6','B'}, {'7','8','9','C'}, {'*','0','#','D'} }; byte rowPins[ROWS] = {7, 6, 5, 4}; //connect to the row pinouts of the keypad byte colPins[COLS] = {3, 2, 1, 0}; //connect to the column pinouts of the keypad Keypad customKeypad = Keypad( makeKeymap(hexaKeys), rowPins, colPins, ROWS, COLS); void setup(){ Mirf.spi = &MirfHardwareSpi; Mirf.csnPin = 9; Mirf.init(); Mirf.setRADDR((byte *)"clie1"); Mirf.payload = sizeof(unsigned long); Mirf.config(); } void loop(){ char customKey = customKeypad.getKey(); if (customKey){ byte time = customKey; Mirf.setTADDR((byte *)"serv1"); Mirf.send((byte *)&time); while(Mirf.isSending()){ } } } 2.receiving part #include #include #include #include #include #include LiquidCrystal_I2C lcd(0x27,16,2); void setup(){ Serial.begin(9600); lcd.init(); lcd.backlight(); Mirf.spi = &MirfHardwareSpi; Mirf.init(); Mirf.setRADDR((byte *)"serv1"); Mirf.payload = sizeof(unsigned long); Mirf.config(); lcd.print(" ICSTATION"); } void loop(){ byte data[Mirf.payload]; if(!Mirf.isSending() && Mirf.dataReady()){ Serial.println("Got packet"); Mirf.getData(data); Serial.println(char (data[0])); lcd.setCursor(0, 1); lcd.print("The key is "); lcd.print(char(data[0])); } }