VirtualWire.h arduino

I use the library VirtualWire.h. Can anyone explain to me who i use vw_have_message()? It returns true if a message has been received, but who i teste this return?

i would assume

if (vw_have_message() == true)
{
}

i havent used Vwire though

if (vw_have_message() == true)

The == true part is not needed. The function returns true or false. If it returns true, the true == true comparison will be true, just like what the function returned. If it returns false, the false == true comparison will be false, just like what the function returned.

I have to test it.Thanks!

I try to send a msg,like this:

vw_send((uint8_t *)msg, strlen(msg));
if(vw_have_message()){
Serial.println("Receive msg");
}

And nothing,any help?

http://www.airspayce.com/mikem/arduino/VirtualWire/VirtualWire_8h.html vw_send is used by the transmitter

vw_have_message would be used by the receiver.

Are you able to get the simple transmitter.pde and receiver.pde examples to work? I'd start there http://www.airspayce.com/mikem/arduino/VirtualWire/examples.html