# Problem with the VirtualWire Library

Hey, I found a problem in the way of doing my project. First of all I’ll explain what is my project about, then the problem. Im trying to measure distance with RF using the low cost Transmiter and Receiver (433MHz). So I found that the VirtualWire library will be really helpfull, but I didnt find a web page that explain all their commands. Well I tought about using the clock time of the Arduino (micros()) to solve my project. I was trying to send a trama like this (INITIAL_BYTE, DESTINATION_DIRECTION, SOURCE_DIRECTION, DATA AND A BYTE OF CHECKSUM).
First one TX of the Arduino UNO will send a trama, but meanwhile, it will save the clock(Ts1) time when it send it, then the RX of the second Arduino UNO will receive and save the clock time when the message arrives there(Ta2). Then it will prepare a trama to send it to the first Arduino, he will send as DATA the time of arrive of the message and the time(Ts2) when the message is send (its aprox.). Finally the first Arduino will receive the trama and save the time of arrival(Ta1).
Then I will calculate the time the pass to send and receive the message (JUST ONE DIRECTION) = ((Ta1-Ts1)-(Ts2-Ta2))/2.
Using the formula (d=vt) and knowing v =310^8 m/s and t(of one direction) Ill find the distance.
Well the problems comes when i tried to send the clock, the VirtualWire only accepts to send char, but the clock its in unsigned long (beacuse its micros()). I figure how to send it(using sprintf() function), but my receiver gets the clock incomplete. Ill show my code

My tx is:
#include <VirtualWire.h>
unsigned long Tiempo;
char value2[1000];
void setup()
{
// Initialize the IO and ISR
vw_setup(2000); // Bits per sec
Serial.begin(9600);
Serial.println("START: ");

}
void loop()
{
Tiempo=millis();
//Serial.print("El tiempo es: ");
//Serial.println(Tiempo);
//ltoa (Tiempo, value2, 10);
sprintf(value2, “%ld”, Tiempo);
Serial.println(value2);
//send(“D1”);
send(value2);
delay(500);
}
void send (char *message)
{
vw_send((uint8_t *)message, strlen(message));
vw_wait_tx(); // Wait until the whole message is gone
}

And my RX is:
#include <VirtualWire.h>
byte message[1000]; // a buffer to store the incoming messages
byte messageLength = 1000; // the size of the message
void setup()
{
Serial.begin(9600);

// Initialize the IO and ISR
vw_setup(2000); // Bits per sec
}
void loop()
{
if (vw_get_message(message, &messageLength)) // Non-blocking
{