433 MHz RF problems - can't even get test program to work

So I’m just trying to get the test program to work between two Arduinos running the cheap 433 Mhz transmitter/receiver available from Sparkfun.com. Here is a photo http://2.bp.blogspot.com/-eX4brjkyUvI/UhFJVbvJ5mI/AAAAAAAADGc/KfMNBthiVXE/s1600/photo-797097.JPG of my images.

Here’s the transmitter code:

#include <VirtualWire.h>

void setup()
{
    pinMode(12,OUTPUT);
    pinMode(13,OUTPUT);
    //Serial.begin(9600);	  // Debugging only
    //Serial.println("setup");

    // Initialise the IO and ISR
    vw_set_ptt_inverted(true); // Required for DR3100
    vw_setup(2000);	 // Bits per sec
    vw_set_tx_pin(12);

}

void loop()
{
    const char *msg = "7";

    digitalWrite(13, HIGH); // Flash a light to show transmitting
    vw_send((uint8_t *)msg, strlen(msg));
    //Serial.println("waiting to complete send.");
    vw_wait_tx(); // Wait until the whole message is gone
    //Serial.println("Sent.");
    digitalWrite(13, LOW);
    delay(200);
}

And here is the receiver code:

#include <VirtualWire.h>

void setup()
{
    Serial.begin(9600);	// Debugging only
    Serial.println("setup");
    pinMode(12,INPUT);
    pinMode(13,OUTPUT);

    // Initialise the IO and ISR
    vw_set_ptt_inverted(true); // Required for DR3100
    vw_setup(2000);	 // Bits per sec
    vw_set_rx_pin(12);
    vw_rx_start();       // Start the receiver PLL running
}

void loop()
{
    uint8_t buf[VW_MAX_MESSAGE_LEN];
    uint8_t buflen = VW_MAX_MESSAGE_LEN;

    if (vw_get_message(buf, &buflen)) // Non-blocking
    {
	int i;

        digitalWrite(13, true); // Flash a light to show received good message
	delay(500);
        // Message with a good checksum received, dump it.
	Serial.print("Got: ");
	
	for (i = 0; i < buflen; i++)
	{
	    Serial.print(buf[i], HEX);
	    Serial.print(" ");
	}
	Serial.println("");
        digitalWrite(13, false);
        delay(500);
    }
}

I’ve played with the potentiometer on the receiver, and can’t get it to receive anything. I’ve used the antenna pin and used a breadboard cable as an antenna on both the transmitter and receiver, and I’ve also bent both pins so they don’t even go in the breadboard and that didn’t work either. I am stumped. I can’t get the two devices to communicate. Am I missing something obvious?

Possible that you have the receiver too close to the transmitter, causing it to overload when the transmitter transmits. Try a minimum spacing of a few metres.

Nope. I've tried them 5 meters apart, 2 meters apart, and right next to each other, all with the same result.

All I know for sure is that the transmitter is actually looping through and at least THINKS its transmitting its message each loop.

The receiver never gets into its main "if" statement in the loop() function, because the debugging serial.println commands I inserted into it for debugging never get output.

I'm stumped. About to throw these damned things away...

I made a tutorial for this kits in my blog. I haven't finished yet, but the second part will help you to solve the problem.

The information is here controlrobotics.rodrigomompo.com