Library for HT12E

Basically, this is how you set up the HT12E IC:

You can also try this (I found it on the datasheet):

The value of R depends on the supply voltage value (and also on the transmission baud rate, but let's assume it is 3kbps, since this is how much bandwidth you can safely use with simple RF transmitters).

If your power supply is 5VDC, R = 1.0 Mohms. If you are using more than that, please check the HT12E datasheet (http://www.people.cornell.edu/pages/cl457/cl457_yft2/datasheets/HT12E.pdf) to find the correct value.

Once you realize that your HT12E is working all right, you can replace direct connection to Arduino with the RF transmitter and receiver. The transmitter goes attached to HT12E, while the receiver goes with Arduino.