LPG and TEMP using RF

Hi,
I was programming my robot to send a LPG and TEMP readings from one arduino to LCD controlled by another arduino. I know how to send a msg using <VirtualWire.h>
library but dont noe how to send a value that is not fixed i.e. sensor readings. :~
Please help me, I will be extremely obliged.
Regards,
Shubham

I know how to send a msg using <VirtualWire.h> library

Show the code you are using.

Anytime you can do something with literal values, you can do the same thing with data stored in a variable.

:~ I am not able to understand what to write in message and length.

[code]vw_send(message, length)
Transmit a message. "message" is an array of the bytes to send, and "length" is the number of bytes stored in the array. This function returns immediately and the message is sent slowly by an interrupt-based background process.
This is how to use it.
what to assing buff and buflen
void loop()
{
  char msg[7] = {'h','e','l','l','o',' ','#'};

  msg[6] = count;
  digitalWrite(led_pin, HIGH); // Flash a light to show transmitting
  vw_send((uint8_t *)msg, 7);
  vw_wait_tx(); // Wait until the whole message is gone
  digitalWrite(led_pin, LOW);
  delay(1000);
  count = count + 1;
}

[/code] LM35 coding

/* Sensor test sketch
  for more information see http://www.ladyada.net/make/logshield/lighttemp.html
  */

#define aref_voltage 3.3         // we tie 3.3V to ARef and measure it with a multimeter!




//TMP36 Pin Variables
int tempPin = 1;        //the analog pin the TMP36's Vout (sense) pin is connected to
                        //the resolution is 10 mV / degree centigrade with a
                        //500 mV offset to allow for negative temperatures
int tempReading;        // the analog reading from the sensor

void setup(void) {
  // We'll send debugging information via the Serial monitor
  Serial.begin(9600);   

  // If you want to set the aref to something other than 5v
  analogReference(EXTERNAL);
}


void loop(void) {

  tempReading = analogRead(tempPin);  

  Serial.print("Temp reading = ");
  Serial.print(tempReading);     // the raw analog reading

  // converting that reading to voltage, which is based off the reference voltage
  float voltage = tempReading * aref_voltage;
  voltage /= 1024.0; 

  // print out the voltage
  Serial.print(" - ");
  Serial.print(voltage); Serial.println(" volts");

  // now print out the temperature
  float temperatureC = (voltage - 0.5) * 100 ;  //converting from 10 mv per degree wit 500 mV offset
                                               //to degrees ((volatge - 500mV) times 100)
  Serial.print(temperatureC); Serial.println(" degress C");

  // now convert to Fahrenheight
  float temperatureF = (temperatureC * 9.0 / 5.0) + 32.0;
  Serial.print(temperatureF); Serial.println(" degress F");

  delay(1000);
}

You need to convert the data that you send to the Serial Monitor to a string, and use vw_send to send that string.

Normally, you'd use something like this:

char msg[48];
sprintf(msg, "%f degrees F#", temperatureF);
msg[strlen(msg)-1] = strlen(msg);
vw_send(msg, strlen(msg));

However, there is a problem with that approach in that the %f format is not supported by the sprintf() implementation on the Arduino.

There are a number of ways around this. For instance, you could break the float into its whole number and fractional parts and convert each separately, or read this thread: http://arduino.cc/forum/index.php/topic,65185.0.html for other ideas.