#include <VirtualWire.h>
int i;
void setup() {
vw_set_ptt_inverted(true);
vw_set_rx_pin(10);
vw_set_tx_pin(7);
vw_set_ptt_pin(8);
vw_setup(4000);
vw_rx_start();
unsigned int data = 0;Serial.begin(9600); // Debugging only
}
void loop(){byte buf[VW_MAX_MESSAGE_LEN]; // a buffer to hold the incoming messages
byte buflen = VW_MAX_MESSAGE_LEN; // the size of the message
if (vw_get_message(buf, &buflen)){ //if (vw_get_message(message, &msgLength)) // Non-blocking
{
Serial.print("Got: ");
for(i = 0; i < &buflen; i++)
{
Serial.write(buf*);*
}
Serial.println();
}
}
[/quote]
I also have the message (iso c++ forbids comparison between pointer and integer) with my code trying to read the buffer, should be fine according to: http://www.arduino.cc/en/Reference/For
Please help