3 Send a string with a XD-RF-5V
4 - https://mashenarduinoprojects.wordpress.com/projects/arduino-315330433mhz-transmitterreceiver-xd-fstxd-rf-5v/
7 #include <VirtualWire.h>
11 Serial.begin(9600); // Configure the serial connection to the computer
12 vw_set_ptt_inverted(true); // Required by the RF module
13 vw_setup(2000); // bps connection speed
14 vw_set_rx_pin(3); // Arduino pin to connect the receiver data pin
15 vw_rx_start(); // Start the receiver
16 Serial.print("Reciver engaged");
22 uint8_t buf[VW_MAX_MESSAGE_LEN];
23 uint8_t buflen = VW_MAX_MESSAGE_LEN;
24 if (vw_get_message(buf, &buflen)) // We check if we have received data
27 // Message with proper check
28 for (i = 0; i < buflen; i++)
30 Serial.write(buf[i]); // The received data is stored in the buffer
31 // and sent through the serial port to the computer