It is not array anymore because we include the uint8_t already ?
I don't understand what you're saying, but obviously it still is an array, because if it were not, then we wouldn't need to specify a buffer length to transmit.
I mean I can also write like this vw_send(char msg[8],8) ? Instead of writing it like vw_send((uint8_t*)msg,8), char msg[8] = {'1','2','3','4','5','6','7','8'}
So, if I want to send a number 2, then how do I wrote it in array of 8 bits ??? Thanks
uint8_t msg[1] = 2;
vw_send(msg, 1);
So how about the receiving part ?
void loop()
{
uint8_t buf[VW_MAX_MESSAGE_LEN];
uint8_t buflen = VW_MAX_MESSAGE_LEN;
[b] if (vw_get_message(buf, &buflen)) // Non-blocking[/b]
{
int i;
digitalWrite(13, true); // Flash a light to show received good message
// Message with a good checksum received, dump it.
Serial.print("Got: ");
for (i = 0; i < buflen; i++)
{
Serial.print((char)buf[i]);
Serial.print(" ");
}
Serial.println("");
digitalWrite(13, false);
}
}