This code was difficult to write. I'm not too adept in coding, and VirtualWire library was never really meant to run on ATTinies.
Attached to this step are files pertaining to the TX portion of this project.
You MUST use an ATTiny85 because it's the smallest chip that has the timers to support the VirtualWire library.
Specifically for the TX portion, if you happen to have an ATTiny85V - 10PU, good! That means that your remote will work with lower power.
If not, no worries. It will still work.
Everything you need for the TX side will be in the files attached. Here are the basics
- Burn the right fuses onto the chip. You will be running at 8 MHz
- Move VirtualWire to Arduino libraries folder
- Upload the code
- Examine the breadboard/schematic so you know what you're handling.
If you need details about programming ATTinies with Arduino, check this out.
DETAILS ABOUT THE CODE
The RF Modules were designed for easy use with Arduino. The original goal was for these RF modules to act as invisible wires. Ideally, you could just say:
//2400 baud for the 434 model
//send out to transmitter
And on the RX side, which is running:
int pin = 3;
//2400 baud for the 434 model
int data = Serial.read();
if (data == 97)
What we hope to happen is that when we Serial.println("a"), the "a" will be received on the other side.
Sadly, there's a lot of noise. When I tried this code out, the receiver would randomly switch on from some stray signal in the air, or not switch on at all because that "a" could not even survive to the receiver antenna.
This code doesn't work. There needs to be a method to reduce the noise by filtering. Fortunately, VirtualWire does that for us!
Based on my limited knowledge, VirtualWire takes advantage of the timers in the microcontroller to sort of sync two RF modules. In order for this to work, we must use the ATTiny85. Timer0 does not exist on the 45.
In order for The ATTiny85 to run at 3.7v, we have to run the microcontroller without an external crystal.
So, we will burn the fuses for 8MHz internal clock.
The following code simply sends the character "a" constantly over the RF module.
Use an ATTiny85 @8MHz. 45 will not work with VirtualWire
#include <VirtualWire.h> // Library used for communication with RF links
const int notifPin = 0; // LED connected to this pin
const int TXpin = 1; // This pin connected to RF link
vw_set_ptt_inverted(true); // setup stuff
vw_setup(4800); // 4800 bps
digitalWrite(notifPin, HIGH); // Blink LED to show it's working
char *msg = "a"; // Send "a", ASCII 97.
vw_send((uint8_t*)msg, 1); // Sends the char
vw_wait_tx(); // Wait until the char is sent
DETAILS ABOUT CIRCUIT
The TX circuit is pretty simple.
- There is a 1k pullup resistor to Vcc on the reset pin
- Nothing is attached to A3 and A2 [2 and 3]
- GND is attached to a button switch to battery- 
- Digital 0  is attached to an LED. The LED leads into a 270 ohm resistor to GND
- Digital 1  is connected to DATA on the RF Module
- A1  is not connected to anything
- Vcc is connected to battery +
- The RF module is connected to Vcc and GND appropriately.
When the code runs, if the button is pressed, the whole circuit will be switched ON
The LED should turn on and the ATTiny85 will be sending "a" over the RF module constantly.