this is the code iam using. this is to control two motors . i have connected the data pin of the rf receiver module to the rx pin of arduino. the problem iam facing is that if iam connection usb cable arduino is not receiving the wireless data.
You have a couple things going on. Have you tried skipping the rf devices and using wires between the pc and the arduino just for initial testing? For testing of the rf device do you just want to see the outpt of the rf device in the serial monitor? If so, then try connecting the tx of the rf receiver to the tx pin on the arduino, probably thru a diode with the band end connected to the rf tx pin. The below link has my thoughts on arduino TTL that might be of interest.
http://forum.arduino.cc/index.php?topic=233906.msg1684842#msg1684842