BMP180 transmitting through FS100A RF module but receiver showing random data

Transmitter:

#include <SFE_BMP180.h>
#include <VirtualWire.h>
#include <string.h>
const int led_pin = 13;
const int transmit_pin = 12;
const int receive_pin = 11;
const int transmit_en_pin = 3;
SFE_BMP180 bmp180;

void setup()
{
    // Initialise the IO and ISR
    vw_set_tx_pin(transmit_pin);
    vw_set_rx_pin(receive_pin);
    vw_set_ptt_pin(transmit_en_pin);
    vw_set_ptt_inverted(true); // Required for DR3100
    vw_setup(2000);       // Bits per sec
    pinMode(led_pin, OUTPUT);
    Serial.begin(9600);  
  if (!bmp180.begin()){  
    Serial.println("ERROR");///if there is an error in communication  
    while (1) {}  
  }  

}

byte count = 1;

void loop()
{
  char msg0[10];
char msg1[10];
char status;
  double T,P;
int temp = 0;
int pres = 0;
  
  // Start a temperature measurement:
  // If request is successful, the number of ms to wait is returned.
  // If request is unsuccessful, 0 is returned.

  status = bmp180.startTemperature();
  if (status != 0)
  {
    // Wait for the measurement to complete:
    delay(status);

    // Retrieve the completed temperature measurement:
    // Note that the measurement is stored in the variable T.
    // Function returns 1 if successful, 0 if failure.

    status = bmp180.getTemperature(T);
    if (status != 0)
    {
      // Print out the measurement:
      Serial.print("temperature: ");
      Serial.print(T,2);
      Serial.print(" deg C, ");
      Serial.print((9.0/5.0)*T+32.0,2);
      Serial.println(" deg F");
      
      // Start a pressure measurement:
      // The parameter is the oversampling setting, from 0 to 3 (highest res, longest wait).
      // If request is successful, the number of ms to wait is returned.
      // If request is unsuccessful, 0 is returned.

      status = bmp180.startPressure(3);
      if (status != 0)
      {
        // Wait for the measurement to complete:
        delay(status);

        // Retrieve the completed pressure measurement:
        // Note that the measurement is stored in the variable P.
        // Note also that the function requires the previous temperature measurement (T).
        // (If temperature is stable, you can do one temperature measurement for a number of pressure measurements.)
        // Function returns 1 if successful, 0 if failure.

        status = bmp180.getPressure(P,T);
        if (status != 0)
        {
          // Print out the measurement:
          Serial.print("absolute pressure: ");
          Serial.print(P,2);
          Serial.print(" mb, ");
          Serial.print(P*0.0295333727,2);
          Serial.println(" inHg");
          temp=bmp180.getTemperature(T);
          pres=bmp180.getPressure(P,T);
          
  digitalWrite(led_pin, HIGH); // Flash a light to show transmitting
  itoa(temp, msg1, 10);                  // Converting temparature to an array of chars
  itoa(pres, msg0, 10);                   // Converting the pressure to an array of chars  
  strcat(msg0,msg1);                   
  vw_send((uint8_t *)msg0, strlen(msg0));
  vw_wait_tx(); // Wait until the whole message is gone
  digitalWrite(led_pin, LOW);
  delay(1000);
  count= count+1;
        }
      }
    }
  }
    }

Receiver:

#include <VirtualWire.h>
const int led_pin = 13;
const int transmit_pin = 12;
const int receive_pin = 11;
const int transmit_en_pin = 3;
long tm,t,d; //variables to hold time in seconds
  
  int i;
void setup()
{
    Serial.begin(9600);	// Debugging only
    Serial.println("setup");

    // Initialise the IO and ISR
    vw_set_tx_pin(transmit_pin);
    vw_set_rx_pin(receive_pin);
    vw_set_ptt_pin(transmit_en_pin);
    vw_set_ptt_inverted(true); // Required for DR3100
    vw_setup(2000);	 // Bits per sec

    vw_rx_start();       // Start the receiver PLL running

    pinMode(led_pin, OUTPUT);
    
}

void loop()
{
    uint8_t buf[VW_MAX_MESSAGE_LEN];
    uint8_t buflen = VW_MAX_MESSAGE_LEN;

    if (vw_get_message(buf, &buflen)) // Non-blocking
    {


        digitalWrite(led_pin, HIGH); // Flash a light to show received good message
	// Message with a good checksum received, dump it.
	Serial.print("Got: ");
	tm = millis();//needed to keep track of time elapsed since serial monitor has been opened
      t = tm/1000;
      d = tm%1000;
      
      //printing time in seconds  on the serial monitor
      Serial.print("t = ");
      Serial.print(t);
      Serial.print(".");
      Serial.print(d);
    
   for (i=0;i<4;i++)               
  {
                 
  Serial.print(buf[i]);
  Serial.println();
  }  
                                              
  Serial.print("degree C"); 

  Serial.print(":  "); 
    for (i=5;i<10;i++)           
    {
                      
      Serial.print(buf[i]);  
    Serial.println();
    }  
        
  vw_wait_rx();
        digitalWrite(led_pin, LOW);
}
}

I have attached a screenshot of the serial monitors. The transmitter monitor(COM 3) data should be duplicated to the receiver serial monitor(COM 4).
The serial monitor on the receiver end just prints the time along with 0 and blanks. Any help would be really appreciated. Thanks

The data that you are transmitting have nothing to do with the temperature or pressure and they are definitely not "random".

Review how you read the temperature and pressure in both cases.

As i'm new to arduino, a little bit of help would be really appreciated about what i am doing wrong because it shows the temperature and pressure perfectly when i serial print it.

a little bit of help would be really appreciated

I offered some help, by suggesting that you look closely at how the temperature is obtained and printed.

If you did not do that, here it is again:

  1. Get the temperature and print it:
    status = bmp180.getTemperature(T);
    if (status != 0)
    {
      // Print out the measurement:
      Serial.print("temperature: ");
      Serial.print(T,2);
  1. Get the temperature again (why?) and send it by radio:
      temp=bmp180.getTemperature(T);
      pres=bmp180.getPressure(P,T);
         
      digitalWrite(led_pin, HIGH); // Flash a light to show transmitting
      itoa(temp, msg1, 10);                  // Converting temparature to an array of chars
      itoa(pres, msg0, 10);                   // Converting the pressure to an array of chars 
      strcat(msg0,msg1);                   
      vw_send((uint8_t *)msg0, strlen(msg0));

Now, compare those two operations, and explain what "temp" and "pres" have to do with T and P.

Actually, I'm not sure why the first operation works. You [u]should[/u] call the library functions with pointers to the temperature and pressure variables, like this:

    status = bmp180.getTemperature(&T);
    status = bmp180.getPressure(&P,&T);

I used itoa because fs1000a can send only strings and not variables and i printed it the first time to make sure that i knew what should be seen on the receiver monitor. Could you find any errors in the transmitter vw_send syntax and i would really appreciate if you could tell me if my for loops in the receiver part are right. PS: sorry for asking really dumb questions. I just learnt Arduino a week ago.

I used itoa because fs1000a can send only strings

Nonsense. You can send any data you like.

Here is how to transmit a four byte floating point variable (temperature):

float T = 26.5;
vw_send((uint8_t *)&T, sizeof(T));

Here is how to receive the four byte float:

    float T = 0.0;
    uint8_t buflen = 4;
    if (vw_get_message((uint8_t *)&T, &buflen)) // Non-blocking
    {
     Serial.println(T);

So i can just send &P &T for pressure and temperature using vw_send twice to the receiver and it would print the same?

The beauty of Arduino is that you can try things, see if they work, and learn.

Thanks a lot for the help. :)