Thanks @weradis for you prompt reply. I am using the same example as the LoRaWAN example. I just adjusted the prepareTxFrame() function as follows:
static void prepareTxFrame
( uint8_t port )
{
pinMode(PWM1,INPUT);
pulse1 = pulseIn(PWM1, HIGH);
sensor1 = pulse1/147;
appDataSize = 4;
appData[0] = 0x00;
appData[1] = 0x01;
appData[2] = 0x02;
appData[3] = 0x03;
Serial.print(sensor1);
Serial.print(" ");
Serial.print("inch from PWM");
Serial.println(" ");
}