Help with Serial library and VirrtualWire Library

Hello to all,

I was building a project to test the 434 MHz transmitters and receivers i bought recently. However I had only one Arduino (UNO) . So i figured that connecting the data pin of the receiver to the RX pin and using the Serial Library would solve my problem. I used Virtual Wire Library for the transmitter side. Sadly, it did not work. :disappointed_relieved: The connections are as follows:

transmitter

vcc ---- 5v
gnd ---- gnd
data----- d12
ant ------NC

receiver
vcc --- 5v
gnd --- gnd
data --- d0 (rx)
ant ----- NC

/* transmit = VirtualWire ; receive = Serial
Unsuccesful as of 19/3/15
*/

#include <VirtualWire.h>

const int led_pin = 8;
const int transmit_pin = 12;
const int transmit_en_pin = 3;
char rec;
int i = 0;
int r;
void setup()
{
    // Initialise the IO and ISR
    Serial.begin(9600);
    Serial.println ("Setup has begun");
    vw_set_tx_pin(transmit_pin);
    vw_setup(2000);       // Bits per sec
    pinMode(led_pin, OUTPUT);
    Serial.println ("Setup completed");
}

void loop()
{
 Serial.println ("Sending"); 
  vw_send((uint8_t *)i,1);
  vw_wait_tx(); // Wait until the whole message is gone
  Serial.println ("Sent");
  delay(1000);
  i != i;
  Serial.print ("i = \t");
  Serial.println (i);
  
  /* receiving */
  if (Serial.available()){
    Serial.print ("Transfer succesful!! Now receiving");
    rec = Serial.read();
    Serial.print ("I received: \t");
    Serial.println (rec);
  }
}

Moderator edit: Code added

transmitter.ino (900 Bytes)

VirtualWire doesn't transmit anything the UART would understand.

Thanks a lot AWOL for replying. But, then how would i make it work? I want the transmitter to use Virtual-wire and the receiver to use Serial Library to print to the serial monitor. Please suggest me some edits and explain UART please, I'm a newbie.

Thanks,

But, then how would i make it work?

Buy a second Arduino.
Make one of the Arduinos a transmitter, and the second a receiver.

Or tie the VirtualWire Rx pin to another digital pin, and then simply use the VirtualWire receive methods.

Ok, buying another board is one way, and using VirtualWire for both of the modules is another way but is there a way to do this without using VirtualWire library??